What is the component, helper and why are they used, is there other way we can do same thing, what is better?
Answer / Nakul Kumar
Component: It is a reusable PHP class that extends CComponent. Helper is a convenience function provided by Yii to perform specific tasks. They are used to reduce the repetitive code and enhance productivity. For the same functionality, you can use plain PHP classes or functions. However, using built-in components and helpers provided by Yii offers better performance, consistency, and less boilerplate code.
| Is This Answer Correct ? | 0 Yes | 0 No |
Explain the difference between homeurl and baseurl in yii2?
What are the directory structure of yii?
How we can get current controller & action name in yii?
How we can change the url for yii::app()->homeurl in yii2?
Can we deploy applications to different servers?
What are the steps to install yii 2.0 framework?
List some database related functions in yii 2 framework?
Explain directory structure of yii 2 framework?
How to include a javascript menu through a site?
How to access module component?
How to use asset bundles in yii?
What are yii helpers?