/** * Get a default blade value, if any is available * * @return BladeCompiler|null A default blade value or Null if no default value is available */ public function getDefaultBlade() { // The blade compiler is usually only available, once // Laravel's view service provider has been initialised. // Thus, before just returning the Blade Facade's root // instance, we must make sure that the view facade // actually returns something $view = View::getFacadeRoot(); if (!is_null($view)) { return Blade::getFacadeRoot(); } return $view; }