예제 #1
0
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit($id, State $state)
 {
     $city = $this->cityModel->find($id);
     $states = $state->select('nome', 'id')->orderBy('nome', 'asc')->lists('nome', 'id');
     return view('cities.edit', compact('city', 'states'));
 }
예제 #2
0
 /**
  * Show the form for creating a new resource.
  *
  * @return Response
  */
 public function create(State $state, City $city)
 {
     $states = $state->select('nome', 'id')->orderBy('nome', 'asc')->lists('nome', 'id');
     $cities = $city->select('cidade_nome', 'id')->orderBy('cidade_nome', 'asc')->lists('cidade_nome', 'id');
     return view('service_units.create', compact('states', 'cities'));
 }