public function catalogo()
 {
     $cliente_id = User::where('email', Input::get('email'))->get()[0]->load('miembrosDe')['miembrosDe'][0]->cliente_id;
     $catalogo = Catalogos::find(Input::get('catalogo_id'))->load('menu')['menu'];
     $catalogo = $this->preparoCatalogo($catalogo);
     return Response::json($catalogo);
 }
 public function clientes()
 {
     $cliente_id = User::where('email', Input::get('email'))->get()[0]->load('miembrosDe')['miembrosDe'][0]->cliente_id;
     $clientesInternos = ClientesInternos::where('cliente_id', $cliente_id)->get();
     return Response::json($clientesInternos);
 }
Exemple #3
0
 /**
  * Create a new user instance after a valid registration.
  *
  * @param  array  $data
  * @return User
  */
 public function create(array $data)
 {
     return User::create(['name' => $data['name'], 'email' => $data['email'], 'password' => bcrypt($data['password'])]);
 }