Before using the advanced template, it is advisable to configure RESTful Web Services, since, as you saw in previous chapters, this configuration allows you to easily add a new application in the same project.
Yii provides many built-in features to create RESTful Web Services and it reduces the code needed to implement it that is always structured with models, controllers, and actions.
These are its main features:
Default actions (
index
,view
,create
,update
,delete
, andoptions
) inyii\rest\ActiveController
, which is the base controller suggested to overrideA response format selectable from input
Customized authentication and authorization
Caching and rate limiting
Yii applies well-established knowledge about RESTful Web Services creation, such as how to present metadata in the response output. So, it is advisable that we follow the framework guidelines as far as possible; in this way, we will write commonly manageable REST APIs.
The first thing...