prevent loading views if view class not in container (#691)

This commit is contained in:
Vladimir Yuldashev
2018-12-19 13:12:05 +01:00
committed by Barry vd. Heuvel
parent 32df0a3bc6
commit 3d7f124089
+4 -2
View File
@@ -37,8 +37,10 @@ class IdeHelperServiceProvider extends ServiceProvider
*/ */
public function boot() public function boot()
{ {
$viewPath = __DIR__.'/../resources/views'; if ($this->app->has('view')) {
$this->loadViewsFrom($viewPath, 'ide-helper'); $viewPath = __DIR__ . '/../resources/views';
$this->loadViewsFrom($viewPath, 'ide-helper');
}
$configPath = __DIR__ . '/../config/ide-helper.php'; $configPath = __DIR__ . '/../config/ide-helper.php';
if (function_exists('config_path')) { if (function_exists('config_path')) {