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()
    {
         View::composer('frontEnd.includes.header',function($view){
            $publishedCategories=Category::where('status',0)->get();
            $view->with('publishedCategories',$publishedCategories);
        });
         View::composer('frontEnd.home.homeContent',function($view){
            $publishedTypes=Type::where('status',0)->get();
            $view->with('publishedTypes',$publishedTypes);
        });
    }
public function boot ( ) { View :: composer ( 'frontEnd.includes.header' , function ( $ view ) { $ publishedCategories = Category :: where ( 'status' , 0 ) -> get ( ) ; $ view -> with ( 'publishedCategories' , $ publishedCategories ) ; } ) ; View :: composer ( 'frontEnd.home.homeContent' , function ( $ view ) { $ publishedTypes = Type :: where ( 'status' , 0 ) -> get ( ) ; $ view -> with ( 'publishedTypes' , $ publishedTypes ) ; } ) ; }
Bootstrap any application services.
Bootstrap any application services .