O'Reilly logo

Mastering Yii by Charles R. Portwood II

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Summary

In this chapter, we expanded upon our knowledge of everything we've learned thus far and also learned how to create RESTful JSON and XML APIs in Yii2. First, we covered the usage of yii\rest\ActiveController, which enabled us to quickly create CRUD APIs based upon our model classes. We then covered Yii2's built-in authentication filters and covered how we can protect our resources by requiring authentication. We also covered the creation of our own authentication filters to support different authentication schemes. We then covered several other useful API classes, including yii\filters\VerbFilter, yii\filters\Cors, and learned how to handle errors within our API. Additionally, we detailed some important information about creating our own ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required