29 lines
617 B
PHP
29 lines
617 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class Brand extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $table = 'brands';
|
|
protected $primaryKey = 'id';
|
|
|
|
protected $fillable = [
|
|
'nama_brand',
|
|
'createdAt',
|
|
'updatedAt',
|
|
'deletedAt'
|
|
];
|
|
public $timestamps = false;
|
|
|
|
// Relasi ke Product (1 brand bisa punya banyak produk) //! Belom dipake buat relasi ke Product
|
|
// public function products()
|
|
// {
|
|
// return $this->hasMany(Product::class, 'brand_id', 'id');
|
|
// }
|
|
|
|
} |