/**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index($id)
 {
     $l = \App\Local::find($id);
     if ($l) {
         return ['mensagens' => $l->mensagens->toArray()];
     }
 }
 /**
  * Active the specified resource from storage.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function active($id)
 {
     $almacen = Local::find($id);
     $almacen->estatus = 'activo';
     $almacen->save();
     $auditoria = new Auditoria();
     $auditoria->content = 'Ha activado un almacen ID: ' . $almacen->id . ' - Nombre: ' . $almacen->nombre;
     $auditoria->user_id = \Auth::user()->id;
     $auditoria->save();
     Flash::success('Almacen activado exitosamente');
     return redirect()->route('admin.almacenes.index');
 }
Пример #3
0
 /**
  * Display the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function show($id)
 {
     return \App\Local::find($id);
 }