Mcuhos cambios .w.
This commit is contained in:
@@ -16,7 +16,7 @@ class Usuario extends Model {
|
||||
use UuidPrimaryKey, SoftDeletes;
|
||||
|
||||
protected $table = 'usuarios';
|
||||
protected $hidden = ['created_at', 'updated_at', 'deleted_at'];
|
||||
protected $hidden = ['created_at', 'updated_at', 'deleted_at', 'pivot'];
|
||||
protected $fillable = ['id', 'auth0_id', 'nombre'];
|
||||
protected $appends = ['roles'];
|
||||
|
||||
@@ -53,21 +53,10 @@ class Usuario extends Model {
|
||||
return $this->belongsToMany(Restaurante::class, 'usuarios_restaurantes', 'usuario_id', 'restaurante_id');
|
||||
}
|
||||
|
||||
public function administrador() {
|
||||
return $this->hasOne(Administrador::class);
|
||||
public function zonasProduccion() {
|
||||
return $this->belongsToMany(ZonaProduccion::class, 'productores', 'usuario_id', 'zona_produccion_id');
|
||||
}
|
||||
|
||||
public function recaudador() {
|
||||
return $this->hasOne(Recaudador::class);
|
||||
}
|
||||
|
||||
public function mesero() {
|
||||
return $this->hasOne(Mesero::class);
|
||||
}
|
||||
|
||||
public function productor() {
|
||||
return $this->hasOne(Productor::class);
|
||||
}
|
||||
|
||||
public function getRolesAttribute() {
|
||||
$auth0Service = app(Auth0Service::class);
|
||||
|
||||
Reference in New Issue
Block a user