radiate-framework / framework

A WordPress plugin and theme framework
https://radiate-framework.github.io/
MIT License
4 stars 0 forks source link

Resource controller doesn't return a route, and doesn't have a middleware method. #77

Open BenRutlandWeb opened 3 years ago

BenRutlandWeb commented 3 years ago

Describe the bug Using a Route::resource() method doesn't return a Route so there is no middleware method available.

BenRutlandWeb commented 3 years ago

In addition to not working in the same way as the other routes, resource controllers don't allow for parameter naming, excluding/including methods or any other features that are/could be included on the normal routes.

A decision needs to be made as to whether the resource controller serves a big enough purpose to be worthwhile - the end result can, after all, be achieved with standard routes. Using resource controllers decrease boilerplate code, but are (currently) way less flexible.