コード例 #1
0
 /**
  * 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.');
 }
コード例 #2
0
ファイル: PeriodsController.php プロジェクト: JJHdez/OpenTpmW
 public function findPeriod(Route $route)
 {
     $this->period = \App\Period::findOrFail($route->getParameter('period'));
 }