# Missing required parameter

**Symptom:** You get an error page saying

```
Missing required parameters for [Route...]
```

**Cause:** There are two possible causes:

1. You dont have a primary-key for your table
2. You have a primary-key but it's **not** called `id`

**Solution:** As there are two causes, there are also two solutions: 1. Simply create a field `id` for the table\
2\. Tell your model about your primary-key: `protected $primaryKey = 'your_primary_key';`

Please consider following [Eloquents model conventions](https://laravel.com/docs/eloquent#eloquent-model-conventions)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://voyager-docs.devdojo.com/troubleshooting/missing-required-parameter.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
