/** * Bootstrap the application services. * * @return void */ public function boot() { view()->composer('*', function ($view) { $view->with('currentUser', \Auth::user())->with('totalQuotes', \App\Entities\Quote::count())->with('totalDealers', \App\Entities\User::count())->with('quoteStats', \App\Entities\Quote::getStats()); }); }
public function index() { $quotes = Quote::latest()->simplePaginate(20); return view('quotes.lists')->with(compact('quotes')); }