16 lines
368 B
PHP
16 lines
368 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\HasMany;
|
|
|
|
class Product extends Model
|
|
{
|
|
protected $table = "products";
|
|
public $timestamps = false;
|
|
protected $fillable = ["sku", "name", "item_type"];
|
|
|
|
public function tags(): HasMany { return $this->hasMany(Tag::class, "product_id"); }
|
|
}
|