コード例 #1
0
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy(Staff $staff)
 {
     $staff->delete();
     return redirect()->route('admin.staffs.index');
 }
コード例 #2
0
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function destroy(Staff $staff)
 {
     if ($staff->deleted_at !== null) {
         abort(410);
     }
     $staff->delete();
     return Redirect::route('staff.index')->with('message', 'Staff deleted');
 }