Beispiel #1
0
 public function registrarNuevoUsuario(array $data)
 {
     $dato = $this->newQuery()->where('email', '=', $data['email'])->get()->count();
     if ($dato == 0) {
         $usuario = User::create(['email' => $data['email'], 'estado' => 'Enable', 'password' => bcrypt('secret')]);
         return $usuario->id;
     } else {
         return 0;
     }
 }
Beispiel #2
0
 public function user()
 {
     return $this->hasMany(User::getClass());
 }
Beispiel #3
0
 public function user()
 {
     return $this->belongsTo(User::getClass());
 }
Beispiel #4
0
 public function reserva()
 {
     return $this->belongsToMany(User::getClass(), 'reserva');
 }