예제 #1
0
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $tRoads = TrainRoad::all();
     return view('trainRoads.index', ['tRoads' => $tRoads]);
 }
예제 #2
0
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit($id)
 {
     try {
         $station = Stantion::findOrFail($id);
     } catch (ModelNotFoundException $e) {
         abort(404);
     }
     $tRoads = TrainRoad::all();
     return view('stations.edit', ['stationName' => $station->stantion_name, 'id' => $station->id, 'trainRoads' => $tRoads, 'trID' => $station->train_road_id]);
 }