33 lines
848 B
PHP
33 lines
848 B
PHP
<?php
|
||
|
||
namespace App\Filament\Admin\Resources\Awards\Pages;
|
||
|
||
use App\Filament\Admin\Resources\Awards\AwardResource;
|
||
use App\Filament\Admin\Resources\Components\TranslationTabs;
|
||
use Filament\Resources\Pages\CreateRecord;
|
||
|
||
class CreateAward extends CreateRecord
|
||
{
|
||
protected static string $resource = AwardResource::class;
|
||
|
||
public function getTitle(): string
|
||
{
|
||
return __('awards.create') ?? 'Yeni Ödül Ekle';
|
||
}
|
||
|
||
protected function getRedirectUrl(): string
|
||
{
|
||
return $this->getResource()::getUrl('index');
|
||
}
|
||
|
||
protected function getCreatedNotificationTitle(): ?string
|
||
{
|
||
return __('awards.created_successfully') ?? 'Ödül başarıyla eklendi.';
|
||
}
|
||
|
||
protected function afterCreate(): void
|
||
{
|
||
TranslationTabs::saveTranslations($this->record, $this->form->getState());
|
||
}
|
||
}
|