mirror of
https://github.com/Cybrarist/Discount-Bandit.git
synced 2026-11-24 19:49:54 +01:00
20 lines
327 B
PHP
20 lines
327 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class Category extends Model
|
|
{
|
|
use HasFactory;
|
|
protected $guarded=['id'];
|
|
|
|
|
|
public function products()
|
|
{
|
|
return $this->belongsToMany(Product::class)->withTimestamps();
|
|
|
|
}
|
|
}
|