* docs(openspec): propose setup-foundation change Add OpenSpec change for SPEC Phase 0 — Foundation with proposal, design, capability specs, and implementation tasks. Populate openspec/config.yaml with project context and artifact rules. Co-authored-by: Cursor <cursoragent@cursor.com> * feat: bootstrap Laravel 13 foundation (Fase 0) Implement OpenSpec change setup-foundation: Laravel 13 + Filament 5 admin panel, Livewire 4 public site shell, PostgreSQL via Compose, design tokens, role-based auth, quality gates (Pint/Larastan/Pest), FrankenPHP Dockerfile, and GitHub Actions CI with five blocking jobs. Co-authored-by: Cursor <cursoragent@cursor.com> * fix(ci): use valid APP_KEY for encryption in tests Co-authored-by: Cursor <cursoragent@cursor.com> --------- Co-authored-by: Cursor <cursoragent@cursor.com>
60 lines
1.5 KiB
PHP
60 lines
1.5 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Filament\Resources\Users;
|
|
|
|
use App\Filament\Resources\Users\Pages\CreateUser;
|
|
use App\Filament\Resources\Users\Pages\EditUser;
|
|
use App\Filament\Resources\Users\Pages\ListUsers;
|
|
use App\Filament\Resources\Users\Schemas\UserForm;
|
|
use App\Filament\Resources\Users\Tables\UsersTable;
|
|
use App\Models\User;
|
|
use App\Policies\UserPolicy;
|
|
use BackedEnum;
|
|
use Filament\Resources\Resource;
|
|
use Filament\Schemas\Schema;
|
|
use Filament\Support\Icons\Heroicon;
|
|
use Filament\Tables\Table;
|
|
|
|
class UserResource extends Resource
|
|
{
|
|
protected static ?string $model = User::class;
|
|
|
|
protected static ?string $policy = UserPolicy::class;
|
|
|
|
protected static string|BackedEnum|null $navigationIcon = Heroicon::OutlinedUsers;
|
|
|
|
protected static ?string $navigationLabel = 'Usuários';
|
|
|
|
protected static ?string $modelLabel = 'usuário';
|
|
|
|
protected static ?string $pluralModelLabel = 'usuários';
|
|
|
|
public static function form(Schema $schema): Schema
|
|
{
|
|
return UserForm::configure($schema);
|
|
}
|
|
|
|
public static function table(Table $table): Table
|
|
{
|
|
return UsersTable::configure($table);
|
|
}
|
|
|
|
public static function getRelations(): array
|
|
{
|
|
return [
|
|
//
|
|
];
|
|
}
|
|
|
|
public static function getPages(): array
|
|
{
|
|
return [
|
|
'index' => ListUsers::route('/'),
|
|
'create' => CreateUser::route('/create'),
|
|
'edit' => EditUser::route('/{record}/edit'),
|
|
];
|
|
}
|
|
}
|