From 3d7f1240896a075aa23b13f82dfcbe165dadeef2 Mon Sep 17 00:00:00 2001 From: Vladimir Yuldashev Date: Wed, 19 Dec 2018 15:12:05 +0300 Subject: [PATCH] prevent loading views if `view` class not in container (#691) --- src/IdeHelperServiceProvider.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/IdeHelperServiceProvider.php b/src/IdeHelperServiceProvider.php index 91a64cd..ff4bf4e 100644 --- a/src/IdeHelperServiceProvider.php +++ b/src/IdeHelperServiceProvider.php @@ -37,8 +37,10 @@ class IdeHelperServiceProvider extends ServiceProvider */ public function boot() { - $viewPath = __DIR__.'/../resources/views'; - $this->loadViewsFrom($viewPath, 'ide-helper'); + if ($this->app->has('view')) { + $viewPath = __DIR__ . '/../resources/views'; + $this->loadViewsFrom($viewPath, 'ide-helper'); + } $configPath = __DIR__ . '/../config/ide-helper.php'; if (function_exists('config_path')) {