Creating modules
If you have created a complex application part and want to use it with some degree of customization in your next project, most probably you need to create a module. In this recipe, we will see how to create an application log view module.
Getting ready
Create a new yii2-app-basic
application using the composer, as described in the official guide at http://www.yiiframework.com/doc-2.0/guide-start-installation.html.
How to do it…
Let's do some planning first.
In yii2-app-basic
with default configuration, all log entries are stored in the runtime/logs/app.log
file. We can extract all messages from this file with help of regular expressions and display them on the GridView widget. Besides, we must allow the user to configure the path to ...
Get Yii2 Application Development Cookbook - Third Edition 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.