Merge branch 'giane' of https://github.com/BryamE/ProyectoLauck into giane
This commit is contained in:
@@ -9,6 +9,14 @@ class Product extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
protected $guarded = [];
|
||||
|
||||
|
||||
public function hasLowStock(): bool
|
||||
{
|
||||
//cambiar
|
||||
return $this->stock_quantity <= $this->min_stock_alert;
|
||||
}
|
||||
|
||||
public function supplier()
|
||||
{
|
||||
return $this->belongsTo(Suppliers::class);
|
||||
@@ -27,7 +35,6 @@ class Product extends Model
|
||||
{
|
||||
return $this->belongsToMany(Sale::class, 'sale_details');
|
||||
}
|
||||
|
||||
}
|
||||
/**$user->sales: Te da la lista de todas las compras de ese usuario.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user