handle($request->validated()); return LoanProcessResource::make($loan); } public function process(string $loanId, ProcessLoanAction $processLoan) { return LoanProcessResource::make($processLoan->handle($loanId)); } public function show(string $loanId, GetLoanAction $getLoan) { return LoanResource::make($getLoan->handle($loanId)); } public function history(string $loanId, GetLoanHistoryAction $getLoanHistory) { return LoanHistoryResource::collection($getLoanHistory->handle($loanId)); } }