ListLoans::route('/'), 'view' => ViewLoan::route('/{record}'), ]; } public static function getEloquentQuery(): Builder { return parent::getEloquentQuery() ->withCount('histories') ->with([ 'loanType:id,name,code', 'workflowConfiguration:id,name,version', 'currentStep.stageDefinition:id,name,code', 'managerApprover:id,name', ]); } }