38 lines
946 B
PHP
38 lines
946 B
PHP
<?php
|
|
|
|
namespace App\Filament\Resources\Publication\News\Pages;
|
|
|
|
use App\Filament\Actions\BackAction;
|
|
use App\Filament\Resources\Publication\News\NewsResource;
|
|
use App\Filament\Support\CheerfulNotification;
|
|
use Filament\Notifications\Notification;
|
|
use Filament\Resources\Pages\CreateRecord;
|
|
|
|
class CreateNews extends CreateRecord
|
|
{
|
|
protected static string $resource = NewsResource::class;
|
|
|
|
public function getTitle(): string
|
|
{
|
|
return CheerfulNotification::getMessage('Tambah Berita Seru! 🚀✨', 'Tambah Berita');
|
|
}
|
|
|
|
protected function getHeaderActions(): array
|
|
{
|
|
return [
|
|
BackAction::make()
|
|
->url(ListNews::getUrl()),
|
|
];
|
|
}
|
|
|
|
protected function getCreatedNotification(): ?Notification
|
|
{
|
|
return CheerfulNotification::create();
|
|
}
|
|
|
|
protected function getRedirectUrl(): string
|
|
{
|
|
return $this->getResource()::getUrl('index');
|
|
}
|
|
}
|