update deploy
This commit is contained in:
43
app/Models/Page.php
Normal file
43
app/Models/Page.php
Normal file
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Database\Factories\PageFactory;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
|
||||
class Page extends Model
|
||||
{
|
||||
/** @use HasFactory<PageFactory> */
|
||||
use Concerns\HasTurkishSlug, HasFactory;
|
||||
|
||||
/**
|
||||
* @var list<string>
|
||||
*/
|
||||
protected $fillable = [
|
||||
'slug',
|
||||
'title',
|
||||
'meta_title',
|
||||
'meta_description',
|
||||
'is_active',
|
||||
];
|
||||
|
||||
/**
|
||||
* @return array<string, string>
|
||||
*/
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
'is_active' => 'boolean',
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return HasMany<PageBlock, $this>
|
||||
*/
|
||||
public function blocks(): HasMany
|
||||
{
|
||||
return $this->hasMany(PageBlock::class)->orderBy('order_index');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user