Ocultando los campos de timestamps de los modelos
This commit is contained in:
@@ -11,6 +11,7 @@ class Administrador extends Model {
|
|||||||
use UuidPrimaryKey, SoftDeletes;
|
use UuidPrimaryKey, SoftDeletes;
|
||||||
|
|
||||||
protected $table = 'administradores';
|
protected $table = 'administradores';
|
||||||
|
protected $hidden = ['created_at', 'updated_at', 'deleted_at'];
|
||||||
|
|
||||||
public function usuario() {
|
public function usuario() {
|
||||||
return $this->belongsTo(Usuario::class);
|
return $this->belongsTo(Usuario::class);
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ use Illuminate\Database\Eloquent\SoftDeletes;
|
|||||||
class BodegaActual extends Model {
|
class BodegaActual extends Model {
|
||||||
|
|
||||||
protected $table = 'bodega_actual';
|
protected $table = 'bodega_actual';
|
||||||
|
protected $hidden = ['created_at', 'updated_at', 'deleted_at'];
|
||||||
|
|
||||||
|
|
||||||
public function restaurante() {
|
public function restaurante() {
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ use Illuminate\Database\Eloquent\SoftDeletes;
|
|||||||
class BodegaEgreso extends Model {
|
class BodegaEgreso extends Model {
|
||||||
|
|
||||||
protected $table = 'bodega_egresos';
|
protected $table = 'bodega_egresos';
|
||||||
|
protected $hidden = ['created_at', 'updated_at', 'deleted_at'];
|
||||||
|
|
||||||
|
|
||||||
public function restaurante() {
|
public function restaurante() {
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ use Illuminate\Database\Eloquent\SoftDeletes;
|
|||||||
class BodegaIngreso extends Model {
|
class BodegaIngreso extends Model {
|
||||||
|
|
||||||
protected $table = 'bodega_ingresos';
|
protected $table = 'bodega_ingresos';
|
||||||
|
protected $hidden = ['created_at', 'updated_at', 'deleted_at'];
|
||||||
|
|
||||||
|
|
||||||
public function restaurante() {
|
public function restaurante() {
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ use Illuminate\Database\Eloquent\SoftDeletes;
|
|||||||
class BodegaMovimiento extends Model {
|
class BodegaMovimiento extends Model {
|
||||||
|
|
||||||
protected $table = 'bodega_movimientos';
|
protected $table = 'bodega_movimientos';
|
||||||
|
protected $hidden = ['created_at', 'updated_at', 'deleted_at'];
|
||||||
|
|
||||||
|
|
||||||
public function restaurante() {
|
public function restaurante() {
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ class BoletaElectronica extends Model {
|
|||||||
use UuidPrimaryKey, SoftDeletes;
|
use UuidPrimaryKey, SoftDeletes;
|
||||||
|
|
||||||
protected $table = 'boletas_electronicas';
|
protected $table = 'boletas_electronicas';
|
||||||
|
protected $hidden = ['created_at', 'updated_at', 'deleted_at'];
|
||||||
|
|
||||||
public function venta() {
|
public function venta() {
|
||||||
return $this->belongsTo(Venta::class);
|
return $this->belongsTo(Venta::class);
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ class BoletaExenta extends Model {
|
|||||||
use UuidPrimaryKey, SoftDeletes;
|
use UuidPrimaryKey, SoftDeletes;
|
||||||
|
|
||||||
protected $table = 'boletas_exentas';
|
protected $table = 'boletas_exentas';
|
||||||
|
protected $hidden = ['created_at', 'updated_at', 'deleted_at'];
|
||||||
|
|
||||||
public function venta() {
|
public function venta() {
|
||||||
return $this->belongsTo(Venta::class);
|
return $this->belongsTo(Venta::class);
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ class Caja extends Model {
|
|||||||
use UuidPrimaryKey, SoftDeletes;
|
use UuidPrimaryKey, SoftDeletes;
|
||||||
|
|
||||||
protected $table = 'cajas';
|
protected $table = 'cajas';
|
||||||
|
protected $hidden = ['created_at', 'updated_at', 'deleted_at'];
|
||||||
|
|
||||||
public function restaurante() {
|
public function restaurante() {
|
||||||
return $this->belongsTo(Restaurante::class);
|
return $this->belongsTo(Restaurante::class);
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ class CanalVenta extends Model {
|
|||||||
use UuidPrimaryKey, SoftDeletes;
|
use UuidPrimaryKey, SoftDeletes;
|
||||||
|
|
||||||
protected $table = 'canales_venta';
|
protected $table = 'canales_venta';
|
||||||
|
protected $hidden = ['created_at', 'updated_at', 'deleted_at'];
|
||||||
protected $fillable = ['id', 'nombre', 'restaurante_id', 'sector_id', 'tipo_canal_id'];
|
protected $fillable = ['id', 'nombre', 'restaurante_id', 'sector_id', 'tipo_canal_id'];
|
||||||
|
|
||||||
public static function findOrFail($id) {
|
public static function findOrFail($id) {
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ class Categoria extends Model {
|
|||||||
use UuidPrimaryKey, SoftDeletes;
|
use UuidPrimaryKey, SoftDeletes;
|
||||||
|
|
||||||
protected $table = 'categorias';
|
protected $table = 'categorias';
|
||||||
|
protected $hidden = ['created_at', 'updated_at', 'deleted_at'];
|
||||||
protected $fillable = ['id', 'nombre', 'restaurante_id'];
|
protected $fillable = ['id', 'nombre', 'restaurante_id'];
|
||||||
|
|
||||||
public static function findOrFail($id) {
|
public static function findOrFail($id) {
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ class Compra extends Model {
|
|||||||
use UuidPrimaryKey, SoftDeletes;
|
use UuidPrimaryKey, SoftDeletes;
|
||||||
|
|
||||||
protected $table = 'compras';
|
protected $table = 'compras';
|
||||||
|
protected $hidden = ['created_at', 'updated_at', 'deleted_at'];
|
||||||
protected $fillable = [
|
protected $fillable = [
|
||||||
'id', 'fecha_compra', 'proveedor_id', 'en_arqueo', 'restaurante_id'
|
'id', 'fecha_compra', 'proveedor_id', 'en_arqueo', 'restaurante_id'
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ class CompraIngrediente extends Model {
|
|||||||
use UuidPrimaryKey, SoftDeletes;
|
use UuidPrimaryKey, SoftDeletes;
|
||||||
|
|
||||||
protected $table = 'compra_ingredientes';
|
protected $table = 'compra_ingredientes';
|
||||||
|
protected $hidden = ['created_at', 'updated_at', 'deleted_at'];
|
||||||
protected $fillable = ['id', 'unidades', 'monto_unitario', 'compra_id', 'ingrediente_id'];
|
protected $fillable = ['id', 'unidades', 'monto_unitario', 'compra_id', 'ingrediente_id'];
|
||||||
|
|
||||||
public function ingrediente() {
|
public function ingrediente() {
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ class Efectivo extends Model {
|
|||||||
use UuidPrimaryKey, SoftDeletes;
|
use UuidPrimaryKey, SoftDeletes;
|
||||||
|
|
||||||
protected $table = 'efectivos';
|
protected $table = 'efectivos';
|
||||||
|
protected $hidden = ['created_at', 'updated_at', 'deleted_at'];
|
||||||
|
|
||||||
public function caja() {
|
public function caja() {
|
||||||
return $this->belongsTo(Caja::class);
|
return $this->belongsTo(Caja::class);
|
||||||
|
|||||||
@@ -11,4 +11,5 @@ class EstadoProduccion extends Model {
|
|||||||
use UuidPrimaryKey, SoftDeletes;
|
use UuidPrimaryKey, SoftDeletes;
|
||||||
|
|
||||||
protected $table = 'estados_produccion';
|
protected $table = 'estados_produccion';
|
||||||
|
protected $hidden = ['created_at', 'updated_at', 'deleted_at'];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ class Factura extends Model {
|
|||||||
use UuidPrimaryKey, SoftDeletes;
|
use UuidPrimaryKey, SoftDeletes;
|
||||||
|
|
||||||
protected $table = 'facturas';
|
protected $table = 'facturas';
|
||||||
|
protected $hidden = ['created_at', 'updated_at', 'deleted_at'];
|
||||||
protected $fillable = ['id', 'numero', 'monto_bruto', 'compra_id'];
|
protected $fillable = ['id', 'numero', 'monto_bruto', 'compra_id'];
|
||||||
|
|
||||||
public static function findOrFail($id) {
|
public static function findOrFail($id) {
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ class Ingrediente extends Model {
|
|||||||
use UuidPrimaryKey, SoftDeletes;
|
use UuidPrimaryKey, SoftDeletes;
|
||||||
|
|
||||||
protected $table = 'ingredientes';
|
protected $table = 'ingredientes';
|
||||||
|
protected $hidden = ['created_at', 'updated_at', 'deleted_at'];
|
||||||
protected $fillable = ['id', 'nombre', 'medida', 'restaurante_id'];
|
protected $fillable = ['id', 'nombre', 'medida', 'restaurante_id'];
|
||||||
|
|
||||||
public static function findOrFail($id) {
|
public static function findOrFail($id) {
|
||||||
|
|||||||
@@ -11,4 +11,5 @@ class MedioPago extends Model {
|
|||||||
use UuidPrimaryKey, SoftDeletes;
|
use UuidPrimaryKey, SoftDeletes;
|
||||||
|
|
||||||
protected $table = 'medios_pago';
|
protected $table = 'medios_pago';
|
||||||
|
protected $hidden = ['created_at', 'updated_at', 'deleted_at'];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ class Mesero extends Model {
|
|||||||
use UuidPrimaryKey, SoftDeletes;
|
use UuidPrimaryKey, SoftDeletes;
|
||||||
|
|
||||||
protected $table = 'meseros';
|
protected $table = 'meseros';
|
||||||
|
protected $hidden = ['created_at', 'updated_at', 'deleted_at'];
|
||||||
|
|
||||||
public function usuario() {
|
public function usuario() {
|
||||||
return $this->belongsTo(Usuario::class);
|
return $this->belongsTo(Usuario::class);
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ class Producto extends Model {
|
|||||||
use UuidPrimaryKey, SoftDeletes;
|
use UuidPrimaryKey, SoftDeletes;
|
||||||
|
|
||||||
protected $table = 'productos';
|
protected $table = 'productos';
|
||||||
|
protected $hidden = ['created_at', 'updated_at', 'deleted_at'];
|
||||||
protected $fillable = [
|
protected $fillable = [
|
||||||
'id', 'nombre', 'precio_venta', 'categoria_id',
|
'id', 'nombre', 'precio_venta', 'categoria_id',
|
||||||
'zona_produccion_id', 'restaurante_id'
|
'zona_produccion_id', 'restaurante_id'
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ class Productor extends Model {
|
|||||||
use UuidPrimaryKey, SoftDeletes;
|
use UuidPrimaryKey, SoftDeletes;
|
||||||
|
|
||||||
protected $table = 'productores';
|
protected $table = 'productores';
|
||||||
|
protected $hidden = ['created_at', 'updated_at', 'deleted_at'];
|
||||||
|
|
||||||
public function usuario() {
|
public function usuario() {
|
||||||
return $this->belongsTo(Usuario::class);
|
return $this->belongsTo(Usuario::class);
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ class Proveedor extends Model {
|
|||||||
use UuidPrimaryKey, SoftDeletes;
|
use UuidPrimaryKey, SoftDeletes;
|
||||||
|
|
||||||
protected $table = 'proveedores';
|
protected $table = 'proveedores';
|
||||||
|
protected $hidden = ['created_at', 'updated_at', 'deleted_at'];
|
||||||
protected $fillable = [
|
protected $fillable = [
|
||||||
'id', 'rut', 'nombre', 'descripcion',
|
'id', 'rut', 'nombre', 'descripcion',
|
||||||
'direccion', 'telefono', 'restaurante_id'
|
'direccion', 'telefono', 'restaurante_id'
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ class Recaudador extends Model {
|
|||||||
use UuidPrimaryKey, SoftDeletes;
|
use UuidPrimaryKey, SoftDeletes;
|
||||||
|
|
||||||
protected $table = 'recaudadores';
|
protected $table = 'recaudadores';
|
||||||
|
protected $hidden = ['created_at', 'updated_at', 'deleted_at'];
|
||||||
|
|
||||||
public function usuario() {
|
public function usuario() {
|
||||||
return $this->belongsTo(Usuario::class);
|
return $this->belongsTo(Usuario::class);
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ class Receta extends Model {
|
|||||||
use UuidPrimaryKey;
|
use UuidPrimaryKey;
|
||||||
|
|
||||||
protected $table = 'recetas';
|
protected $table = 'recetas';
|
||||||
|
protected $hidden = ['created_at', 'updated_at', 'deleted_at'];
|
||||||
protected $fillable = ['unidades', 'producto_id', 'ingrediente_id'];
|
protected $fillable = ['unidades', 'producto_id', 'ingrediente_id'];
|
||||||
|
|
||||||
public function ingrediente() {
|
public function ingrediente() {
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ class Restaurante extends Model {
|
|||||||
use UuidPrimaryKey, SoftDeletes;
|
use UuidPrimaryKey, SoftDeletes;
|
||||||
|
|
||||||
protected $table = 'restaurantes';
|
protected $table = 'restaurantes';
|
||||||
|
protected $hidden = ['created_at', 'updated_at', 'deleted_at'];
|
||||||
protected $fillable = ['id', 'nombre'];
|
protected $fillable = ['id', 'nombre'];
|
||||||
|
|
||||||
public static function findOrFail($id) {
|
public static function findOrFail($id) {
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ class Sector extends Model {
|
|||||||
use UuidPrimaryKey, SoftDeletes;
|
use UuidPrimaryKey, SoftDeletes;
|
||||||
|
|
||||||
protected $table = 'sectores';
|
protected $table = 'sectores';
|
||||||
|
protected $hidden = ['created_at', 'updated_at', 'deleted_at'];
|
||||||
protected $fillable = ['id', 'nombre', 'restaurante_id'];
|
protected $fillable = ['id', 'nombre', 'restaurante_id'];
|
||||||
|
|
||||||
public static function findOrFail($id) {
|
public static function findOrFail($id) {
|
||||||
|
|||||||
@@ -11,4 +11,5 @@ class TipoCanal extends Model {
|
|||||||
use UuidPrimaryKey, SoftDeletes;
|
use UuidPrimaryKey, SoftDeletes;
|
||||||
|
|
||||||
protected $table = 'tipos_canal';
|
protected $table = 'tipos_canal';
|
||||||
|
protected $hidden = ['created_at', 'updated_at', 'deleted_at'];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ class Usuario extends Model {
|
|||||||
use UuidPrimaryKey, SoftDeletes;
|
use UuidPrimaryKey, SoftDeletes;
|
||||||
|
|
||||||
protected $table = 'usuarios';
|
protected $table = 'usuarios';
|
||||||
|
protected $hidden = ['created_at', 'updated_at', 'deleted_at'];
|
||||||
protected $fillable = ['id', 'auth0_id', 'nombre'];
|
protected $fillable = ['id', 'auth0_id', 'nombre'];
|
||||||
protected $appends = ['roles'];
|
protected $appends = ['roles'];
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ class Venta extends Model {
|
|||||||
use UuidPrimaryKey, SoftDeletes;
|
use UuidPrimaryKey, SoftDeletes;
|
||||||
|
|
||||||
protected $table = 'ventas';
|
protected $table = 'ventas';
|
||||||
|
protected $hidden = ['created_at', 'updated_at', 'deleted_at'];
|
||||||
|
|
||||||
public function mesero() {
|
public function mesero() {
|
||||||
return $this->belongsTo(Mesero::class);
|
return $this->belongsTo(Mesero::class);
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ class VentaProducto extends Model {
|
|||||||
use UuidPrimaryKey, SoftDeletes;
|
use UuidPrimaryKey, SoftDeletes;
|
||||||
|
|
||||||
protected $table = 'venta_productos';
|
protected $table = 'venta_productos';
|
||||||
|
protected $hidden = ['created_at', 'updated_at', 'deleted_at'];
|
||||||
|
|
||||||
public function venta() {
|
public function venta() {
|
||||||
return $this->belongsTo(Venta::class);
|
return $this->belongsTo(Venta::class);
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ class ZonaProduccion extends Model {
|
|||||||
use UuidPrimaryKey, SoftDeletes;
|
use UuidPrimaryKey, SoftDeletes;
|
||||||
|
|
||||||
protected $table = 'zonas_produccion';
|
protected $table = 'zonas_produccion';
|
||||||
|
protected $hidden = ['created_at', 'updated_at', 'deleted_at'];
|
||||||
protected $fillable = ['id', 'nombre', 'restaurante_id'];
|
protected $fillable = ['id', 'nombre', 'restaurante_id'];
|
||||||
|
|
||||||
public static function findOrFail($id) {
|
public static function findOrFail($id) {
|
||||||
|
|||||||
Reference in New Issue
Block a user