/** * Gets the desired model. * * @param $id * * @throws Illuminate\Database\Eloquent\ModelNotFoundException * * @return Model */ public function get($id) { return Player::findOrFail($id); }
/** * Remove the specified resource from storage. * * @param int $id * @return Response */ public function destroy($id) { $player = Player::findOrFail($id); $player->delete(); return redirect()->route('players.index')->with('message', 'Item deleted successfully.'); }