Merge branch 'giane' of https://github.com/BryamE/ProyectoLauck into giane

This commit is contained in:
gianella
2025-12-09 17:43:32 -03:00
27 changed files with 929 additions and 207 deletions
+8 -1
View File
@@ -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.