/** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index() { $widgets = Widget::all(); return view('widget.index', compact('widgets')); }
/** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index() { $widgets = Widget::all(); return view('widgets.index')->with('widgets', $widgets); }