예제 #1
0
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy($id)
 {
     // delete
     Team::destroy($id);
     // redirect
     Session::flash('message', 'Successfully deleted the team owner!');
     return Redirect::to('view');
 }
예제 #2
0
 public static function destroy($id)
 {
     $Team = new Team(array('id' => $id));
     $Team->destroy();
     Redirect::to('/team', array('message' => 'Joukkue on poistettu onnistuneesti!'));
 }
예제 #3
0
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function destroy($id)
 {
     //
     $team = Team::find($id);
     Team::destroy($id);
     if (file_exists(public_path('teams/' . $team->image))) {
         unlink(public_path('teams/' . $team->image));
     }
     return redirect('team');
 }