Added blog, pages, menu, category

This commit is contained in:
Gitea
2025-04-28 01:09:25 +05:30
parent 66cf32a7bb
commit 08e1110abd
36 changed files with 1205 additions and 34 deletions

32
app/Models/Blog.php Normal file
View File

@@ -0,0 +1,32 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class Blog extends Model
{
use HasFactory;
protected $fillable = [
'post',
'slug',
'content',
'meta',
'custom_header',
'post_image',
'is_published',
'category_id',
];
protected $casts = [
'meta' => 'json'
];
public function category(): BelongsTo
{
return $this->belongsTo(Category::class);
}
}