Skip to content
Advertisement

Missing required parameters for [Route: ticket.edit] [URI: ticket_ads/edit/{ad}]

I am trying to edit a record in a table. I have created a route and the form, but I can’t get past this error. I have figured out the problem but I can’t find a fix. Am I correct in thinking that the edit.blade.php file needs the $ad->id passing?

The $ad->id is an ID of a specific add in a List View. The list view has all the tickets displayed from a table, and the below link is meant to edit that one item.

The edit route is accessed using following code:

JavaScript

I have one route that is supposed to open up the edit view form:

JavaScript

The above route points to this in the controller:

JavaScript

This is the view called by the above function:

JavaScript

This is the line that throws the error

JavaScript

The ID displays normally in the URL as ticket_ads/edit/7 for example.

How do I get past this?

Advertisement

Answer

Change this line:

JavaScript

to this:

JavaScript
User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement