simedkom/app/Filament/Resources/Master/Users/Pages/ManageUsers.php
Yoga Pangestu 28ec50494d feat: Add policies for SubClassification, SubLocation, and User models
- Created SubClassificationPolicy to manage authorization for SubClassification actions.
- Created SubLocationPolicy to manage authorization for SubLocation actions.
- Created UserPolicy to manage authorization for User actions.
- Integrate Filament Shield for role and permission management
- Updated DashboardPanelProvider to include FilamentShieldPlugin.
- Added filament-shield package to composer.json and updated composer.lock.
- Created filament-shield.php configuration file for Shield settings.
- Created permission.php configuration file for Spatie permissions.
- Added migration for creating permission tables.
- Created ShieldSeeder to seed roles and permissions.
- Updated DatabaseSeeder to include ShieldSeeder.
- Updated UserSeeder to assign the Developer role to the created user.
2025-11-20 09:00:59 +07:00

32 lines
995 B
PHP

<?php
namespace App\Filament\Resources\Master\Users\Pages;
use App\Filament\Resources\Master\Users\UserResource;
use Filament\Actions\CreateAction;
use Filament\Resources\Pages\ManageRecords;
use Filament\Support\Enums\Width;
class ManageUsers extends ManageRecords
{
protected static ?string $title = 'Pengguna';
protected static string $resource = UserResource::class;
protected function getHeaderActions(): array
{
return [
CreateAction::make()
->label('Tambah')
->modalHeading('Tambah Pengguna')
->modalSubmitActionLabel('Simpan')
->modalCancelActionLabel('Batal')
->extraModalFooterActions(fn (CreateAction $action): array => [
$action->makeModalSubmitAction('createAnother', arguments: ['another' => true])
->label('Simpan dan Tambah Lagi'),
])
->modalWidth(Width::Large),
];
}
}