Summary

In this chapter, we have discussed the third kind of default application installed with Yii's advanced template, the console application.

We have seen the primary differences between console and web applications, and we have learned how to create our first console controller, handling options and parameters to pass to the actions. Then, we have applied a console application with a concrete example, such as making maintenance operation to the reservation table in order to update the status of the reservations to expired.

Then, we focused on how the console application can make pretty outputs, using colors and text formatting features.

Finally, we have mastered how to create a complete periodic task with a console controller action to send ...

Get Yii2 By Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.