/** * Show the form for editing the specified sitesplugins. * * @param int $id * @return \Illuminate\View\View */ public function edit($id) { $sitesplugins = Sitesplugins::find($id); $menu = Menu::orderby('position')->lists('title', 'id'); $sites = Sites::lists('title', 'id'); return view('admin.sitesplugins.edit', compact('sitesplugins', 'menu', 'sites')); }
/** * Show a user edit page * * @param $id * * @return \Illuminate\View\View */ public function edit($id) { $user = User::findOrFail($id); $roles = Role::lists('title', 'id'); $sites = Sites::site_access()->lists('title', 'id'); return view('admin.users.edit', compact('user', 'roles', 'sites')); }
/** * Show the form for editing the specified sitelanguages. * * @param int $id * @return \Illuminate\View\View */ public function edit($id) { $sitelanguages = SiteLanguages::find($id); $sites = Sites::site_access()->lists('title', 'id')->prepend('Please select', ''); $languages = Languages::lists('code', 'id')->prepend('Please select', ''); return view('admin.sitelanguages.edit', compact('sitelanguages', 'sites', 'languages')); }
public static function boot() { parent::boot(); Sites::observe(new UserActionsObserver()); }
/** * 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')); Sites::destroy($toDelete); } else { Sites::whereNotNull('id')->delete(); } return redirect()->route('admin.sites.index'); }