kambuku/app/Providers/searchTermProvider.php
/**
     * Bootstrap the application services.
     *
     * @return void
     */
Bootstrap the application services.
@return void
Bootstrap the application services . @return void
public function boot()
    {
        view()->composer('partials.most_searched', function ($view){
            $most_searched = search_terms::orderBy('count', 'DESC')->take(8)->get();
            $view->with(['most_searched' => $most_searched]);
        });
    }
public function boot ( ) { view ( ) -> composer ( 'partials.most_searched' , function ( $ view ) { $ most_searched = search_terms :: orderBy ( 'count' , 'DESC' ) -> take ( 8 ) -> get ( ) ; $ view -> with ( [ 'most_searched' => $ most_searched ] ) ; } ) ; }
Bootstrap the application services.
Bootstrap the application services .
//