39 lines
694 B
PHP
39 lines
694 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Database\Factories\StoryFactory;
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class Story extends Model
|
|
{
|
|
/** @use HasFactory<StoryFactory> */
|
|
use HasFactory;
|
|
|
|
/**
|
|
* @var list<string>
|
|
*/
|
|
protected $fillable = [
|
|
'title',
|
|
'badge',
|
|
'content',
|
|
'image',
|
|
'cta_text',
|
|
'cta_url',
|
|
'order_index',
|
|
'is_active',
|
|
];
|
|
|
|
/**
|
|
* @return array<string, string>
|
|
*/
|
|
protected function casts(): array
|
|
{
|
|
return [
|
|
'order_index' => 'integer',
|
|
'is_active' => 'boolean',
|
|
];
|
|
}
|
|
}
|