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 b5a4c7669d
commit 105e14b48d
21 changed files with 2398 additions and 4 deletions
@@ -0,0 +1,39 @@
<?php
namespace App\Filament\Admin\Resources\Languages\Pages;
use App\Filament\Admin\Resources\Languages\LanguageResource;
use Filament\Notifications\Notification;
use Filament\Resources\Pages\CreateRecord;
class CreateLanguage extends CreateRecord
{
protected static string $resource = LanguageResource::class;
public function getTitle(): string
{
return __('language.create');
}
protected function getCreatedNotification(): ?Notification
{
return Notification::make()
->success()
->title(__('language.created_successfully'))
->body(__('language.created_successfully_body'));
}
protected function getRedirectUrl(): string
{
return $this->getResource()::getUrl('index');
}
protected function mutateFormDataBeforeCreate(array $data): array
{
$data['created_by'] = auth()->id();
$data['updated_by'] = auth()->id();
return $data;
}
}