Пример #1
0
 /**
  * Muestra el formulario para crear un nuevo objetivo
  *
  * @return Response
  */
 public function create($admin, $unitName)
 {
     $units = Unit::whereName($unitName)->get();
     foreach ($units as $unit) {
         $unit = $unit->id;
         return View::make('subjects.create', compact('unit', 'admin'));
     }
 }
Пример #2
0
 /**
  * Muestra un formulario para editar la unidad especificada
  *
  * @param  int  $id
  * @return Response
  */
 public function edit($admin, $unit_name)
 {
     $unit = Unit::whereName($unit_name)->first();
     return View::make('units.edit', compact('unit', 'admin'));
 }