Wiki

Articles in category "tips", sorted by commentsX
Displaying 41-50 of 154 result(s).

Create Form With DynamicModel

Created 3 years ago by Misbahul D MunirTips4 comments – viewed 18,891 times – ( +2 / -1 ) – version 2.0
In yii2 we can create form without create FormModel. Here we go
tags: form, yii2, model

Add model validator in Controller

Created 3 years ago by Kostas Apazidis (KonApaz)Tips4 comments – viewed 17,753 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

Debuging variables in Yii2

Created 2 years ago by johonunuTips3 comments – viewed 15,466 times – ( +2 / -2 ) – version 2.0
This tutorial is explained following "basic" application structure.

Use application on production/development environment without making changes

Created 5 years ago by ifdatticTips3 comments – viewed 53,200 times – ( +8 / -2 ) – version 1.1
I like programing on my localhost, however it really bugged me to make changes to index.php & config files on my production server. After combining all available wiki articles on this topic and some trial and error this is what I use for my applications so I could just upload it to production server and it will work without any changes.

Directory independent extensions

Created 7 years ago by GOshaTips3 comments – viewed 11,993 times – ( +16 / -2 ) – version 1.1
Many people want to use downloaded extensions in their own way. As for me most of the extensions require me to correct Yii::import() instructions inside their source code. All these extensions are directory dependent. To avoid the situation described above, I suggest to implement pseudo-anonymous aliases:

Using sub query for doubletts

Created 5 years ago by mbTips3 comments – viewed 14,207 times – ( +2 / -1 ) – version 1.1
find doubletts by db fields. in this example i will check doublets for 3 tabelfields (col1,col2,col3). so i will get a subquery with the condition, select and grouping of the tablefields. the having with COUNT() > 1 means: find all records more then one result.

Auto TDD - How to auto-run PHPUnit

Created 6 years ago by imeheszTips3 comments – viewed 16,440 times – ( +3 / -2 ) – version 1.1
If you are lucky enough and have the privilege to develop on a Linux based environment, this little tip might boost-up your TDD process (at least the Unit Testing part). Please note, that this should work just fine with Apple computers also, but not tested!
tags: PHPUnit, testing, TDD

CJuiTabs Content

Created 5 years ago by mbalaTips3 comments – viewed 15,543 times – ( +6 / -1 ) – version 1.1
When I used CJuiTabs I did something. They are
tags: CJuiTabs

Real Time Logging

Created 6 years ago by lucifuriousTips3 comments – viewed 26,767 times – ( +14 / -1 ) – version 1.1
I've seen a lot of people asking about the logging facilities in Yii and thought I'd share a nice little class I wrote that provides near real-time logging.

Yii2 default values for Index data Provider

Created 3 years ago by CTalaTips3 comments – viewed 18,779 times – ( +4 / -1 ) – version 2.0
Guys,