*/ public function schema(JsonSchema $schema): array { return [ 'budget_id' => $schema->string()->description('Id of the budget to delete. Call list_budgets to see valid ids.')->required(), ]; } protected function write(Request $request, User $user): Response { $budget = $this->budgetOfUser($request, $user); $budget->delete(); return $this->json(['deleted' => true, 'id' => $budget->id]); } }