'what is the console application in yii2 framework?
Application extends from yii\base\Application by providing functionalities that are specific to console requests. In particular, it deals with console requests through a command-based approach
can any one explain that with more examples
Solution 1:[1]
A console application is an application that uses the installed PHP of the Command Line Interface (CLI) instead of a web server.
Functions of the console application can be called via the yii script by inputting 'php yii' in a terminal inside of the folder where the yii script is installed. (By default this is in the root of your project)
These console application scripts can be run manually by a developer, for example through an SSH connection to the server where your Yii application is installed. Another commonly used method to execute these console application scripts is by putting them in a cronjob. More information on Yii2 console applications can be found here.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | K V |