Initial Commit

This commit is contained in:
dann4624
2022-09-28 09:38:08 +02:00
parent cac476f80f
commit 2d04a269e6
355 changed files with 52166 additions and 25 deletions
+26
View File
@@ -0,0 +1,26 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
class ProductCategory extends Model
{
use HasFactory, SoftDeletes;
protected $fillable = [
'name',
];
public function subcategories()
{
return $this->hasMany(ProductSubcategory::class,'product_category_id','id')->withTrashed();
}
public function products()
{
return $this->hasMany(Product::class,'product_category_id','id')->withTrashed();
}
}