25 lines
459 B
PHP
25 lines
459 B
PHP
<?php
|
|
|
|
namespace App\Models\Shop;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
use Rinvex\Categories\Traits\Categorizable;
|
|
use Conner\Tagging\Taggable;
|
|
|
|
class Category extends Model
|
|
{
|
|
protected $guarded = ['id'];
|
|
protected $table = 'shop_categories';
|
|
|
|
public function Category()
|
|
{
|
|
return $this->hasMany('App\Models\Category');
|
|
}
|
|
|
|
public function Products()
|
|
{
|
|
return $this->hasMany('App\Models\Shop\Product');
|
|
}
|
|
|
|
} |