[WIP] Refactor architecture, models
This commit is contained in:
25
app/Models/Shop/Category.php
Normal file
25
app/Models/Shop/Category.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?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');
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user