November 21, 2016 —John Koster
resource($name, $controller, array $options = [])
The resource
function is a shortcut that is used to register a resource controller with the router. It accepts the $name
of the route to create, the name of the $controller
and an array of $options
that should be used when constructing the routes. Internally, there many individual routes that are created when calling the resource
function.
∎
The following amazing people help support this site and my open source projects ♥️
If you're interesting in supporting my work and want to show up on this list, check out my GitHub Sponsors Profile.