Uploading content
This commit is contained in:
22
app/Models/Product.php
Normal file
22
app/Models/Product.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
class Product extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $fillable = [
|
||||
'name', 'description', 'price', 'stock', 'category', 'brand',
|
||||
'sku', 'weight', 'status', 'order'
|
||||
];
|
||||
|
||||
public function subDepartment() : BelongsTo
|
||||
{
|
||||
return $this->belongsTo(SubDepartment::class);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user