[Wiki] Simple Way to Upload and Save File
This tutorial need extension mdmsoft/yii2-upload-file. Follow the intruction to install. After installation done, create controller and action // in controller public function actionCreate() { $model =...
View Article[Wiki] Uploading Default Image
This Article is about the Uploding a default Image. Purpose: If the User haven't image to upload, this default image will be replaced in the DB. On your Controller: Create();...
View Article[Wiki] How to use Yii2-excelview
Install Yii2-excelview: Either run php composer.phar require --prefer-dist arturoliveira/yii2-excelview "*" or add "arturoliveira/yii2-excelview": "*" to the require section of your composer.json file....
View Article[Wiki] Add model validator in Controller
There are cases that model validators should be depended by controller/action and you couldn't manipulate on the model class or using scenarios in easy way For example, when inserting a new record we...
View Article[Wiki] Step by step for how to full export Yii2 grid to excel
We will leverage Yii2-excelview widget. So, first of all is install Yii2-excelview: Either run php composer.phar require --prefer-dist arturoliveira/yii2-excelview "*" or add...
View Article[Extension] yii2-meta
Databased based automated page meta tags based on route and named parameters
View Article[Extension] yii2-backup
Database Backup and Restore functionality module extention for Yii2
View Article[Extension] yii2-webapplicationend
Organize directories for applications with front-end and back-end for yii2
View Article[Wiki] Use CGridview to sort and filter CSqlDataProvider - when used with...
I have two tables called hospitals and departments. I have a junction table between them which holds the departments in each hospital. But sometimes I need a list of "All hospitals with All possible...
View Article[Extension] yii2-environment
Environment class for Yii 2, used to set configuration for console and web apps depending on the server environment.
View Article[Extension] yiirestmodel
The RESTful API for models with searching, filtering, relations and other features.
View Article[Wiki] Easy way to redirect http:\\localhost\yii2-basic to...
First of all, install yii2 basic template according below link: How to install yii2 basic template Then, normally you have to use http:\localhost\yii2-basic\web to launch your homepage. And our target...
View Article[Wiki] Yii2: Configuring different sessions for backend and frontend in Yii...
This is as an extension of this wiki by Kartik V which shows to make different enableAutoLogin cookies for frontend and backend. What else is needed That take us in a situation where if either the...
View Article[Wiki] Provide SVG when the browser supports it, else PNG (using CHtml::image...
Modern browsers support SVG, older browsers do not. This replacement for CHtml::image() allows you to handle to propose SVG in an efficient way with PNG as a fallback. On the first load, it will wrap...
View Article[Extension] yii2-improved-advanced-template
This template is remake of default advanced template, with extra functionalities included and is shared hosting friendly.
View Article[Extension] yii2-improved-basic-template
This template is remake of default basic template, with extra functionalities included and is shared hosting friendly.
View Article[Wiki] Analyse the server's USER-AGENT against browsecap file to determine...
Does your application need to know user's details on browser details, os and device type? We can use PHP's misc. function to achieve that provided you have an update copy of browsercap.ini <?php /**...
View Article