Пример #1
0
 /**
  * Remove the specified resource from storage.
  *
  * @param int $id
  *
  * @return Response
  */
 public function destroy($id, Request $request)
 {
     $role = Role::findOrFail($id);
     $success = $role->delete();
     if ($request->ajax()) {
         return response()->json(compact('success'));
     }
     Session::flash('danger', 'Se eliminó correctamente');
     return redirect()->route('admin.roles.index');
 }