You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
379 B
PHP

<?php
namespace App\Models;
class Product extends Model
{
const ACTIVE = 0;
const INACTIVE = 1;
protected $fillable = [
'code',
'name',
'price',
'cost',
'stock',
'category_id',
'is_active'
];
public function category()
{
return $this->belongsTo(Category::class)->withTrashed();
}
}