spreadwaves Blog

Create Select dropdown placeholder 0

Select dropdown placeholder

Normally, we have placeholder for input and textarea field. The placeholder will be in gray colored text when you start typing it will turn into black but what about select box? We don’t have...

Set Timezone using PHP 2

How to Set Timezone using PHP

DateTimeZone is the representation of time zone. You can change the timezone using this function. For example, If you want Indian time zone, use “Asia/Kolkata”. $dtz = new DateTimeZone(“Asia/Kolkata”); //Your timezone $now = new...

Creating Controller & Views in YII2 6

Creating Controller and views using Gii tool in Yii2

CRUD Generator This generator generates a controller and views that implement CRUD (Create, Read, Update, Delete) operations for the specified data model. Click “start” button under CRUD generator to create Controller and Views for corresponding...

Create Model in YII2 using GII tool 18

How to create Model in Yii2 using Gii tool

First of all, you should install yii2 to follow these steps. After installation, you can then access Gii tool through the following URL: http://localhost/path/to/index.php?r=gii [eg: http://localhost/yii2advanced/frontend/web/index.php?r=gii] If you have enabled pretty URLs, you may...