public function edit($id) { if (Auth::user()->can('update-clients')) { $client = Client::findOrFail($id); $seccionales = Seccional::orderBy('name', 'asc')->lists('name', 'id'); return view('client::edit', compact('client', 'seccionales')); } return redirect('auth/logout'); }
public function destroy($id) { if (Auth::user()->can('delete-seccionales')) { $seccional = Seccional::findOrFail($id); Seccional::destroy($id); Session::flash('message', trans('client::ui.seccional.message_delete', array('name' => $seccional->name))); return redirect('client/seccional'); } return redirect('auth/logout'); }