You've already forked Atomcms-edit
31 lines
874 B
PHP
Executable File
31 lines
874 B
PHP
Executable File
<?php
|
|
|
|
namespace App\Models\Shop;
|
|
|
|
use Database\Factories\Shop\WebsiteShopCategoryFactory;
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\HasMany;
|
|
|
|
/**
|
|
* @method static \Illuminate\Database\Eloquent\Builder<static>|WebsiteShopCategory whereHas($relation, \Closure $callback = null, $operator = '>=', $count = 1)
|
|
* @method static \Illuminate\Database\Eloquent\Builder<static>|WebsiteShopCategory get($columns = ['*'])
|
|
*/
|
|
class WebsiteShopCategory extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
#[\Override]
|
|
protected $guarded = ['id', 'created_at', 'updated_at'];
|
|
|
|
protected static function newFactory()
|
|
{
|
|
return WebsiteShopCategoryFactory::new();
|
|
}
|
|
|
|
public function articles(): HasMany
|
|
{
|
|
return $this->hasMany(WebsiteShopArticle::class);
|
|
}
|
|
}
|