O'Reilly logo

Yii2 By Example by Fabrizio Caldarelli

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

Chapter 11. Creating an API for Use in a Mobile App

In this chapter, you will learn how to create RESTful Web Services with the new integrated management of Yii 2.

You will learn how to create a new application to manage the api environment and how to create a controller using the default base classes provided by the framework.

Then, we will cover authentication methods and you'll learn how to customize the response output format. We'll also discuss:

  • Configuring the REST app in the advanced template
  • Creating a controller:
    • For example: creating a controller to manage rooms
  • Authentication:
    • For example: using authentication to get a customers list
  • New controller actions:
    • For example: getting a rooms list for a reservation
  • Customizing authentication and the ...

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