/** * Mass delete function from index page * @param Request $request * * @return mixed */ public function massDelete(Request $request) { if ($request->get('toDelete') != 'mass') { $toDelete = json_decode($request->get('toDelete')); FooterMenus::destroy($toDelete); } else { FooterMenus::whereNotNull('id')->delete(); } return redirect()->route('admin.footermenus.index'); }
public static function boot() { parent::boot(); FooterMenus::observe(new UserActionsObserver()); }