diff --git a/app/Http/Middleware/AddUserToView.php b/app/Http/Middleware/AddUserToView.php index 2e3e725..b06f0b9 100644 --- a/app/Http/Middleware/AddUserToView.php +++ b/app/Http/Middleware/AddUserToView.php @@ -6,6 +6,8 @@ use Closure; use Illuminate\Contracts\View\Factory; use Illuminate\Contracts\Auth\Authenticatable; +use App\Models\Setup; + class AddUserToView { /** @@ -44,6 +46,7 @@ class AddUserToView public function handle($request, Closure $next) { $this->factory->share('user',$this->user); + $this->factory->share('setup',Setup::find(config('app.id'))); return $next($request); } diff --git a/resources/views/dashboard.blade.php b/resources/views/dashboard.blade.php index 0f41107..302b7a4 100644 --- a/resources/views/dashboard.blade.php +++ b/resources/views/dashboard.blade.php @@ -5,9 +5,7 @@ @php use App\Classes\Protocol\Binkp; -use App\Models\Setup; $user->load(['systems.akas.zone.domain.echoareas','systems.akas.echoareas']); -$setup = Setup::findOrFail(config('app.id')); @endphp @section('content') diff --git a/resources/views/system/widget/system.blade.php b/resources/views/system/widget/system.blade.php index e5056a5..7a35a7a 100644 --- a/resources/views/system/widget/system.blade.php +++ b/resources/views/system/widget/system.blade.php @@ -1,6 +1,6 @@ @php use App\Classes\FTN\Packet; -use App\Models\{Mailer,Setup,User}; +use App\Models\{Mailer,User}; @endphp @@ -195,7 +195,7 @@ use App\Models\{Mailer,Setup,User};