route('ledger'); return $ledger && $this->user()->can('view', $ledger); } /** * Get the validation rules that apply to the request. * * @return array */ public function rules(): array { return [ 'amount' => ['required', 'integer'], 'description' => ['required', 'string'], 'type' => ['nullable', 'string'], 'status' => ['nullable', 'string'], ]; } }