MIF_E31222467/pos-smartphone-fix/app/Models/Category.php

29 lines
627 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Category extends Model
{
use HasFactory;
protected $table = 'categories';
protected $primaryKey = 'id';
protected $fillable = [
'nama_kategori',
'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');
// }
}