/** * Remove the specified resource from storage. * * @param int $id * @return Response */ public function destroy($id) { $period = Period::findOrFail($id); $period->delete(); return redirect()->route('periods.index')->with('message', 'Item deleted successfully.'); }
public function findPeriod(Route $route) { $this->period = \App\Period::findOrFail($route->getParameter('period')); }