• Reading time ~ 2 min
  • 05.12.2021

Creating routes for a resource controller works like:


where /resource is the string defining the entry point (url) and ResourceController is the name of the required resource controller.

The $options array is an associative array containing any of:

option type(s) description
only array string dynamic Set the methods the controller should apply to
except array string dynamic Set the methods the controller should exclude
names array string Set the route names for controller actions
names.method string Set the route name for a controller action
parameters string array Override the route parameter names
parameters.previous string Override a route parameter’s name
middleware mixed Set a middleware to the resource

These options were derived from the source code.


No comments yet
Yurij Finiv

Yurij Finiv

Full stack


Professional Fullstack developer with experience in website development and desktop development. I have experience with various tools and technologies such as Bootstrap, Tailwind, HTML5, CSS3, PUG, JS, AlpineJs, jQuery, PHP, MODX, Laravel, NodeJS, Git, Docker, hQuery, Guzzle, Livewire, Blade, Twig, Fenom, and Smarty. I have experience in website development using Symfony, MODX and Laravel. Experie...

Ukraine, Lutsk