It’s real easy in CakePHP 3 to add custom routing for REST requests. You can map the GET, POST, PUT and DELETE requests to controller actions using just one line of code. All seems quick and easy until you run into the `Access-Control-Allow-Origin` problem. That’s when the web browser performs a preflight test by making an `OPTIONS` request to the server to see if the actual request is safe to send.
Recently, I had to develop an easier way to browse data scaffolding views in CakePHP using the belongsTo association for models. So I developed a component to handle most of the work for you. The idea behind this component was to make it easier to show paginated results for a table that has a belongsTo […]