34 lines
665 B
PHP
34 lines
665 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\HasMany;
|
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
|
|
|
class NovaCardCategory extends Model
|
|
{
|
|
use HasFactory, SoftDeletes;
|
|
|
|
protected $fillable = [
|
|
'slug',
|
|
'name',
|
|
'description',
|
|
'active',
|
|
'order_num',
|
|
];
|
|
|
|
protected $casts = [
|
|
'active' => 'boolean',
|
|
'order_num' => 'integer',
|
|
];
|
|
|
|
public function cards(): HasMany
|
|
{
|
|
return $this->hasMany(NovaCard::class, 'category_id');
|
|
}
|
|
}
|