schema([ Select::make('client_id')->relationship('client', 'id') ->getOptionLabelFromRecordUsing(fn ($record) => $record->company) ->disabled() ->columnSpan(2), TextInput::make('code')->required() ->unique( 'branches', 'code', ignoreRecord: true, modifyRuleUsing: fn (Unique $rule) => $rule->where('client_id', app(static::getModel())->id) ), TextInput::make('series')->label('Current Series') ->required() ->numeric() ->integer() ->maxLength(6) ->minLength(1) ->mask(RawJs::make(<<<'JS' '999999' JS)), ]); } public static function table(Table $table): Table { return $table ->columns([ // ]) ->filters([ // ]) ->actions([ Tables\Actions\EditAction::make(), ]) ->bulkActions([ Tables\Actions\BulkActionGroup::make([ Tables\Actions\DeleteBulkAction::make(), ]), ]); } public static function getRelations(): array { return [ // AccountsRelationManager::make(), BalancesRelationManager::make(), ]; } public static function getPages(): array { return [ 'index' => Pages\ListBranches::route('/'), 'create' => Pages\CreateBranch::route('/create'), 'edit' => Pages\EditBranch::route('/{record}/edit'), ]; } }