code-style

This commit is contained in:
Saeed Vaziry
2025-03-13 20:53:14 +01:00
parent 0f06d81aac
commit 48ae561ea4
43 changed files with 122 additions and 76 deletions

View File

@ -47,7 +47,7 @@ protected function getTableColumns(): array
public function table(Table $table): Table
{
/** @var \App\Models\User $user */
/** @var User $user */
$user = auth()->user();
return $table
@ -60,7 +60,7 @@ public function table(Table $table): Table
->using(function ($record, array $data): void {
app(UpdateUser::class)->update($record, $data);
})
->form(fn (Form $form, $record): \Filament\Forms\Form => $form
->form(fn (Form $form, $record): Form => $form
->schema([
TextInput::make('name')
->rules(UpdateUser::rules($record)['name']),
@ -86,7 +86,7 @@ public function table(Table $table): Table
->label('Projects')
->icon('heroicon-o-rectangle-stack')
->authorize(fn ($record) => $user->can('update', $record))
->form(fn (Form $form, $record): \Filament\Forms\Form => $form
->form(fn (Form $form, $record): Form => $form
->schema([
CheckboxList::make('projects')
->options(Project::query()->pluck('name', 'id')->toArray())