public function deleteTeam(Team $team) { $message = 'Data ' . $team->namateam . ' berhasil di hapus'; $team->user()->delete(); $team->delete(); return redirect()->back()->with('status', $message); }
/** * 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')); }