app/Providers/AppServiceProvider.php
/**
     * Bootstrap any application services.
     *
     * @return void
     */
Bootstrap any application services.
@return void
Bootstrap any application services . @return void
public function boot()
    {
        Schema::defaultStringLength(191);
        view()->composer('*', function ($view) {
            if (!session()->has('info')) {
                session()->put('info', SiteInfo::find(1));
            }
            view()->share('info', session()->get('info'));
            if ($view->getName() == 'backend.partials._footer') {
                session()->forget('info');
            }
        }); 
        view()->composer('*', function () {
            view()->share('pages', QuickPage::all());
            view()->share('slider', Slider::all());
        });
    }
public function boot ( ) { Schema :: defaultStringLength ( 191 ) ; view ( ) -> composer ( '*' , function ( $ view ) { if ( ! session ( ) -> has ( 'info' ) ) { session ( ) -> put ( 'info' , SiteInfo :: find ( 1 ) ) ; } view ( ) -> share ( 'info' , session ( ) -> get ( 'info' ) ) ; if ( $ view -> getName ( ) == 'backend.partials._footer' ) { session ( ) -> forget ( 'info' ) ; } } ) ; view ( ) -> composer ( '*' , function ( ) { view ( ) -> share ( 'pages' , QuickPage :: all ( ) ) ; view ( ) -> share ( 'slider' , Slider :: all ( ) ) ; } ) ; }
Bootstrap any application services.
Bootstrap any application services .
// if (!session()->has('page')) { //     session()->put('page', QuickPage::get()); // } // view()->share('offer', Offer::all());