Wiki

Sorted by viewsX
Displaying 441-450 of 786 result(s).

Easy way to redirect http:\\localhost\yii2-basic to http:\\localhost\yii2-basic\web\index.php

Created 3 years ago by Scott_HuangTips0 comments – viewed 18,219 times – ( +3 / -4 ) – version 2.0
First of all, install yii2 basic template according below link:

Add model validator in Controller

Created 3 years ago by Kostas Apazidis (KonApaz)Tips4 comments – viewed 18,149 times – ( +1 / -2 ) – version 1.1
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

Impersonate Users within Yii Framework

Created 6 years ago by WoilTutorials6 comments – viewed 18,113 times – ( +22 / -1 ) – version 1.1
For some applications it can be advantageous for administration reasons to allow site administrators to login as other users. This is sometimes called user impersonation or "becoming that user".

Managing constants easily

Created 6 years ago by briiC.lvTips4 comments – viewed 17,953 times – ( +4 / -1 ) – version 1.1
For time to time i have models with constants (basicly status constants) which i use in diferent places and if these constant changes, i have to change mentions of constant in code elsewhere.

get summary of related model via STAT relation

Created 4 years ago by rootbearHow-tos2 comments – viewed 17,911 times – ( +7 / -2 ) – version 1.1
typical scenario: invoice, invoice items.

Insert a multirow header in CGridView

Created 4 years ago by PeppeHow-tos2 comments – viewed 17,881 times – ( +6 / -1 ) – version 1.1
The CGridView widget is very useful and customizable, but sometimes you need a little more. One limit I found is to have only one row for headers; yes, you can write each column header in more than one row, but just inside the single cell. I was looking instead for the possibility to use more than one row, with different structure one from the others. This way you can write columns grouping headers, and obtain a nicer view.

Get 'source' data from the database - for TbEditableColumn or EditableColumn ('type'=>'select' / dropdownlist)

Created 4 years ago by Gerhard LiebenbergHow-tos0 comments – viewed 17,833 times – ( +4 / -2 ) – version 1.1
If you want to edit data directly in the gridview in a 'dropdownlist' style, then you could use the 'type' => 'select' option of TbEditableColumn (YiiBooster) or EditableColumn (x-editable for Yii). This wiki shows how to get data from the db for the 'dropdownlist', by converting AR model data into an array that is passed in json format.

Yii2 and Pdf files with Mpdf

Created 3 years ago by CTalaHow-tos2 comments – viewed 17,815 times – ( +7 / -1 ) – version 2.0
I am still new to composer and packagist, so I want to share how I am creating the pdf files because for me was not as simple as it should be.

Login Form With email or Whatever

Created 3 years ago by nabil abdoualiHow-tos1 comment – viewed 17,784 times – ( -3 ) – version 1.1
Here is my solution to login with email or anything else This update works with database mysql You must generate the user model with GII

Create sitemap.xml file dynamically on root folder with one hit

Created 5 years ago by kiran sharmaHow-tos1 comment – viewed 17,777 times – ( +5 / -6 ) – version 1.1
I had created one controller file which can create sitemap.xml file(which is used for seo, google crawler and many other puropse) dynamically with one run.
tags: SEO, SiteMap, XML