Files
opensem/app/Models/Shop/Product.php
2020-04-21 00:09:32 +02:00

39 lines
804 B
PHP

<?php
namespace App\Models\Shop;
use Illuminate\Database\Eloquent\Model;
use Rinvex\Categories\Traits\Categorizable;
class Product extends Model
{
use Categorizable;
protected $guarded = ['id'];
protected $table = 'shop_products';
public function Inventories()
{
return $this->hasMany('App\Models\Shop\Inventory');
}
public function Prices()
{
return $this->hasMany('App\Models\Shop\ProductPrice');
}
public function ProductAttributes()
{
return $this->hasMany('App\Models\Shop\ProductAttribute');
}
public function Categories()
{
return $this->hasMany('App\Models\Shop\CategoryProduct');
}
public function InvoiceItems()
{
return $this->hasMany('App\Models\Shop\InvoiceItem');
}
}