/**
  * 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');
 }
Esempio n. 2
0
 public static function boot()
 {
     parent::boot();
     FooterMenus::observe(new UserActionsObserver());
 }