Problem
I have been struggling all day to find a good convention to name view routes in Laravel (5.4).
Let's say that I am using resource routes. But I also need to declare a lot of view routes, what is a safe and best practice for declaring such routes?
Example:
I have the following resource routes:
GET /tickets/12/messages
GET /tickets/12/messages/5
POST /tickets/12/messages
PUT /tickets/12/messages/5
PATCH /tickets/12/messages/5
DELETE /tickets/12/messages/5
I also need to define routes for:
- Displaying the view to edit a particular message.
- Displaying the view to add a particular message to a ticket.
- Displaying the view to create a particular ticket.
- Displaying the view to show all the tickets in the system.
- Displaying the view to show all the tickets that belong to a particular user.
And many others... The question is: How would you define the routes I described?
Many thanks!