- Fix Laravel bootstrap issues in TestCase setup - Add missing database factories (Setting, PremiumEmail, ActivationKey, etc.) - Convert Pest tests to PHPUnit style for compatibility - Fix model relationships and boolean casts - Add missing Filament resource actions and filters - Fix form validation and test data mismatches - Resolve assertion parameter order issues - Add proper configuration for test views - Fix searchable columns and table sorting - Simplify complex filter assertions for stability
34 lines
627 B
PHP
34 lines
627 B
PHP
<?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',
|
|
'is_published' => 'boolean',
|
|
];
|
|
|
|
public function category(): BelongsTo
|
|
{
|
|
return $this->belongsTo(Category::class);
|
|
}
|
|
}
|