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()
    {
        $data['categories'] = Categories::all();
        view()->share($data);
    }
public function boot ( ) { $ data [ 'categories' ] = Categories :: all ( ) ; view ( ) -> share ( $ data ) ; }
Bootstrap any application services.
Bootstrap any application services .