schema([ Forms\Components\TextInput::make('name') ->label(__('label.name')) ->required() , Forms\Components\TextInput::make('client_id') ->label(__('oauth.client_id')) ->required() , Forms\Components\TextInput::make('client_secret') ->label(__('oauth.secret')) ->required() , Forms\Components\TextInput::make('authorization_endpoint_url') ->label(__('oauth.authorization_endpoint_url')) ->required() , Forms\Components\TextInput::make('token_endpoint_url') ->label(__('oauth.token_endpoint_url')) ->required() , Forms\Components\TextInput::make('user_info_endpoint_url') ->label(__('oauth.user_info_endpoint_url')) ->required() , Forms\Components\TextInput::make('id_claim') ->label(__('oauth.id_claim')) ->required() , Forms\Components\TextInput::make('username_claim') ->label(__('oauth.username_claim')) , Forms\Components\TextInput::make('email_claim') ->label(__('oauth.email_claim')) , Forms\Components\TextInput::make('level_claim') ->label(__('oauth.level_claim')) , Forms\Components\TextInput::make('level_limit') ->numeric() ->label(__('oauth.level_limit')) ->helperText(__('oauth.level_limit_help')) , Forms\Components\TextInput::make('priority') ->label(__('label.priority')) ->default(0) ->numeric() ->helperText(__('label.priority_help')) , Forms\Components\Toggle::make('enabled') ->label(__('label.enabled')) , ]); } public static function table(Table $table): Table { return $table ->columns([ Tables\Columns\TextColumn::make('id'), Tables\Columns\TextColumn::make('name')->label(__('label.name')), Tables\Columns\TextColumn::make('client_id')->label(__('oauth.client_id')), Tables\Columns\TextColumn::make('client_secret')->label(__('oauth.secret')), Tables\Columns\TextColumn::make('authorization_endpoint_url')->label(__('oauth.authorization_endpoint_url')), Tables\Columns\TextColumn::make('uuid') ->label(__('oauth.redirect')) ->formatStateUsing(fn ($state) => url("/oauth/callback/$state")) , Tables\Columns\TextColumn::make('priority')->label(__('label.priority')), Tables\Columns\TextColumn::make('updated_at')->label(__('label.updated_at')), Tables\Columns\TextColumn::make('level_limit')->label(__('oauth.level_limit')), Tables\Columns\IconColumn::make('enabled')->boolean()->label(__('label.enabled')), ]) ->defaultSort('priority', 'desc') ->filters([ // ]) ->actions([ Tables\Actions\EditAction::make(), Tables\Actions\DeleteAction::make(), ]) ->bulkActions([ Tables\Actions\BulkActionGroup::make([ Tables\Actions\DeleteBulkAction::make(), ]), ]); } public static function getPages(): array { return [ 'index' => Pages\ManageProviders::route('/'), ]; } }