Add Language Management Module: Created Language resource with CRUD pages, schemas, and models to support the universal translation system. Implemented localization for English and Turkish, ensuring consistent user experience. Added necessary policies and seeder for initial language data, enhancing the overall language management functionality.

This commit is contained in:
Ümit Tunç
2025-10-01 04:15:21 -03:00
parent 7cbbf521e1
commit a4aea280f2
21 changed files with 2398 additions and 4 deletions
+13 -1
View File
@@ -2,13 +2,14 @@
namespace App\Models;
use App\Traits\HasTranslations;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
class Blog extends Model
{
use HasFactory, SoftDeletes;
use HasFactory, SoftDeletes, HasTranslations;
protected $fillable = [
'title',
@@ -28,6 +29,17 @@ class Blog extends Model
'allow_comments',
];
/**
* Translatable fields
*/
protected $translatable = [
'title',
'content',
'excerpt',
'meta_title',
'meta_description',
];
protected $casts = [
'published_at' => 'datetime',
'tags' => 'array',