Wiki articles

Showing 41-60 of 142 items.

How to read HTML5 Multiple File Input from controller?

Created 5 years ago by Kartik V, updated 6 months ago by samdark.
0 2
40 followers
Viewed: 13 438 times
Version: 2.0
Category: How-tos

Building a search GET request with scenarios ; calling a SearchModel from URLs...

Created 4 years ago by Louis Gac, updated 4 years ago by Louis Gac.

Search Models are a very elegant and powerful way to build an Active Data Provider. If you use them a lot, you'll quickly need to use scenarios, which will lead you to a very DRY Controller code.

0 0
2 followers
Viewed: 13 778 times
Version: 2.0
Category: Tips

Pjax GridView: refresh page after delete

Created a year ago by hehbhehb, updated 11 months ago by CeBe.

Normally, after clicking the delete button in gridview, the record will be deleted and the page will refresh, but the page number in query string is lost. This is not always the case we expect.

5 0
3 followers
Viewed: 14 456 times
Version: 2.0
Category: How-tos

My Own Components Folder in Yii2

Created 5 years ago by CTala, updated 5 years ago by CTala.

In Yii1 I used to have my own components under the components folder of the structure, now with namespacing this is a little bit different.

2 1
2 followers
Viewed: 14 571 times
Version: 2.0
Category: Tips

Simple revealing and hiding the password in the password field

Created 3 years ago by Bizley, updated 3 years ago by Bizley.

There are numerous usability problems:

2 0
4 followers
Viewed: 14 739 times
Version: 2.0
Category: How-tos

Using the yii2-datecontrol extension along with yii2-detail-view widget

Created 5 years ago by Kartik V, updated 5 years ago by Kartik V.

The yii2-datecontrol extension allows you to control separate date formats for display and saving for form inputs.

1 0
37 followers
Viewed: 14 811 times
Version: 2.0
Category: How-tos

Profiling using XDebug

Created 6 years ago by le_top, updated 4 years ago by le_top.

A short explication on how to extract profile information for PHP on your server using XDebug and KCacheGrind or WinCacheGrind.

3 0
3 followers
Viewed: 14 852 times
Version: all
Category: How-tos

Export query content to excel through any of your controllers, also can set cssClass for header/odd/even rows, auto download

Created 4 years ago by Scott_Huang, updated 4 years ago by Scott_Huang.

To generate excel by query content, and download through any controller. You also can bind cssClass to header/odd/even rows. As for header, you even can set cssClass for each column.

$this->export2excel($excel_content,$excel_file);

in your controller.

2 0
2 followers
Viewed: 15 070 times
Version: 2.0
Category: Tutorials

How to get SEO friendly URL using Model and new getUrl() function

Created a year ago by shiv, updated a year ago by shiv.

We all need SEO friendly URLs for our projects. its not always good to call route with params so we can generalise it for all models using a common function.

2 0
1 follower
Viewed: 15 233 times
Version: 2.0
Category: How-tos

Using multiple models in an identity

Created 9 months ago by samdark, updated 5 months ago by samdark.

Let's assume we have two models: Customer and Supplier and we want both to log in. Yii is quite flexible when it comes to authentication and authorization so it's possible.

8 2
2 followers
Viewed: 15 668 times
Version: 2.0
Category: How-tos

Using your own forked version of extensions with composer

Created 5 years ago by Kartik V, updated 4 years ago by Kartik V.

So you want to use a fork of any existing vendor extension with your Yii 2 install and use the fork, instead of original source. This does not need you to push any update or register your package on packagist.org. You are recommended to follow the approach below:

3 2
40 followers
Viewed: 16 088 times
Version: 2.0
Category: Tutorials

Managing a star rating with the StarRating widget in Yii 2

Created 5 years ago by Kartik V, updated 5 years ago by Kartik V.

In Yii 1.x, there was a built in widget CStarRating based on the jquery star rating plugin. There exists no prebuilt solution in Yii2, however the same concepts can be extended using any jquery plugin.

1 3
41 followers
Viewed: 16 251 times
Version: 2.0
Category: How-tos

Cómo enviar emails usando SMTP

Created 5 years ago by robregonm, updated 5 years ago by robregonm.
2 0
2 followers
Viewed: 16 259 times
Version: 2.0
Category: How-tos

Role Management

Created 4 years ago by Dency G B, updated 4 years ago by Dency G B.

Implementing a role based access control is a very easy process and you can even load your roles from the database if you want.

0 0
5 followers
Viewed: 16 594 times
Version: 2.0
Category: How-tos
Tags: rbac, yii2

A Single Page with a List and a Detail

Created 3 years ago by softark, updated 3 years ago by Patrick Jones.

The CRUD generator of Gii has done a wonderful job for you, and you already have a list of items in the "index" page and a detailed view of a specified item in the "view" page.

2 0
3 followers
Viewed: 17 611 times
Version: 2.0
Category: How-tos

Installare Yii 2.0.* usando XAMPP su Windows in versione portabile

Created 5 years ago by realtebo, updated 4 years ago by realtebo.

Personalmente trovo che la versione "portable" sia molto più semplice da aggiornare, ed io tengo sempre costantemente aggiornato TUTTO il parco software relativo al mio webserver.

0 0
2 followers
Viewed: 18 141 times
Version: 2.0
Category: Tutorials

Automatic Parameter Binding to POST vars in Yii2

Created 5 years ago by aarondfrancis, updated 5 years ago by YiiJeka.

I wrote about this on my blog, but wanted to post it here too.

0 0
4 followers
Viewed: 18 398 times
Version: 2.0
Category: How-tos

MongoDb's embedded documents mapping for ActiveRecord in Yii2

Created 5 years ago by edoardo849, updated 5 years ago by CeBe.

suppose to have in Mongo a collection "user" like:

3 0
6 followers
Viewed: 19 039 times
Version: 2.0
Category: How-tos

Boost composer-asset-plugin update speed

Created 3 years ago by schmunk, updated 3 years ago by samdark.

If you're using a lot of bower and npm assets with Yii 2.0 you might encounter long running composer update tasks.

6 0
6 followers
Viewed: 19 085 times
Version: 2.0
Category: Tips

How to use yii2-authclient to communicate with Twitter using Single Access Token

Created 5 years ago by Antonio Ramirez, updated 5 years ago by Antonio Ramirez.

It is quite simple, but I am sure this small tutorial will help more than one of you out there :)

2 0
4 followers
Viewed: 19 313 times
Version: 2.0
Category: How-tos