public function boot() { view()->composer('layouts.main', function ($view) { $view->with('lines', \App\ProductLine::ordered()->get()); }); }
public function index() { $lines = ProductLine::ordered()->get(); return view('lines.index', compact('lines')); }