예제 #1
0
 public function deleteTeam(Team $team)
 {
     $message = 'Data ' . $team->namateam . ' berhasil di hapus';
     $team->user()->delete();
     $team->delete();
     return redirect()->back()->with('status', $message);
 }
예제 #2
0
 /**
  * Remove the specified resource from storage.
  *
  * @param  \App\Team  $team
  * @return \Illuminate\Http\Response
  */
 public function destroy(Team $team)
 {
     $team->delete();
     return redirect(action('UserController@index'));
 }