- Created NewsResource for managing news entries. - Added pages for creating, editing, and listing news. - Defined NewsForm schema for news entry forms. - Configured NewsTable for displaying news records with actions. - Implemented News model with relationships and soft deletes. - Added factories for generating test data for news and tags. - Created migrations for news and tags tables.
23 lines
508 B
PHP
23 lines
508 B
PHP
<?php
|
|
|
|
namespace App\Filament\Resources\Publication\News\Pages;
|
|
|
|
use App\Filament\Resources\Publication\News\NewsResource;
|
|
use Filament\Actions\CreateAction;
|
|
use Filament\Resources\Pages\ListRecords;
|
|
|
|
class ListNews extends ListRecords
|
|
{
|
|
protected static string $resource = NewsResource::class;
|
|
|
|
protected static ?string $title = 'Berita';
|
|
|
|
protected function getHeaderActions(): array
|
|
{
|
|
return [
|
|
CreateAction::make()
|
|
->label('Tambah'),
|
|
];
|
|
}
|
|
}
|