30 lines
517 B
PHP
30 lines
517 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\HasMany;
|
|
|
|
class ClientCategory extends Model
|
|
{
|
|
protected $fillable = [
|
|
'name',
|
|
'slug',
|
|
'description',
|
|
'is_active',
|
|
'sort_order',
|
|
];
|
|
|
|
protected $casts = [
|
|
'is_active' => 'boolean',
|
|
];
|
|
|
|
/**
|
|
* Get the clients for the category.
|
|
*/
|
|
public function clients(): HasMany
|
|
{
|
|
return $this->hasMany(Client::class);
|
|
}
|
|
}
|