Edit File: ViewServiceProvider.php
<?php namespace App\Providers; use App\Http\View\Composers\NotificationComposer; use App\Models\Contact; use App\Models\Setting; use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\Schema; use Illuminate\Support\Facades\View; use Illuminate\Support\ServiceProvider; class ViewServiceProvider extends ServiceProvider { /** * Register services. * * @return void */ public function register() { // } /** * Bootstrap services. * * @return void */ public function boot() { try { $this->notifications = Contact::where('showOrNow', 0)->get(); $appDirection = (app()->getLocale() == 'ar') ? '-rtl' : ''; View::share('dir', $appDirection); View::share('setting', Setting::all()->pluck('value', 'key')); View::composer('admin.includes.header', NotificationComposer::class); } catch (\Exception $e) { // } } }
Back to File Manager