Showing 21-36 of 36 items.

Model validation for field ranges using yii2-field-range extension

Created 12 years ago by Kartik V Kartik V, updated 12 years ago by Kartik V Kartik V. 0 comments

The yii2-field-range extension enables you to easily setup ActiveField range fields with Bootstrap styling. You basically can setup two attributes joined together like a single field with combined validation error block.

0 0
37
Viewed: 33 475 times
Version: 2.0
Category: Tips

Install specific Yii2 vendor extension & dependency without updating other packages.

Created 12 years ago by Kartik V Kartik V, updated 12 years ago by Kartik V Kartik V. 0 comments

The tips here are for advanced usages of composer and its assumed you have read about using composer and have a knowledge of your vendor packages to be updated. Let's consider, you want to update only one specific yii2 vendor library, without updating all the other extension packages?

2 3
39
Viewed: 49 354 times
Version: 2.0
Category: Tips

Locking your Yii 2 project package versions with composer.lock

Created 12 years ago by Kartik V Kartik V, updated 12 years ago by Kartik V Kartik V. 0 comments

Ok, you have installed a Yii 2 basic or advanced app for the first time and completed the post install steps. You have picked up a few extensions to install for the first time as well. You would already see a composer.lock file in your application root folder.

0 2
37
Viewed: 21 825 times
Version: 2.0
Category: Tips

FORM with GET method causes repeated stacking of URL Parameters

Created 12 years ago by Kartik V Kartik V, updated 12 years ago by toph toph. 3 comments

// In Yii 1.x $form = $this->beginWidget('CActiveForm', [

'id' => 'order-search-form',
'method' => 'get',

]); echo $form->textInput($searchModel, 'id'); echo CHtml::submitButton('Find', ['class' => 'btn btn-primary']); $this->endWidget(); `

7 2
41
Viewed: 68 766 times
Version: all
Category: Tips

Yii 2 list of path aliases available with default basic and advanced app.

Created 12 years ago by Kartik V Kartik V, updated 11 years ago by Kartik V Kartik V. 4 comments

If you are coming over from Yii 1.x to Yii 2, and already read this guide, you may note that namespaces are very important in Yii 2 to identify classes. But do you know the list of seeded path aliases that come shipped with a basic or advanced app? Here is my attempt to list them.

15 4
45
Viewed: 192 340 times
Version: 2.0
Category: Tips

Auto-update denormalized attributes with MongoDb and Yii2

Created 12 years ago by edoardo849 edoardo849, updated 12 years ago by CeBe CeBe. 0 comments

You have different collections in MongoDb with de-normalized attributes. As you may know, due to its not-join nature, MongoDb tends to encourage repetition of the same value in different collections (de-normalization). In this MongoDb is opposed to a more SQL-like approach where you usually reference only the ID of the value with a foreign key.

1 0
3
Viewed: 22 879 times
Version: 2.0
Category: Tips

Using Nginx and Apache2 in separate distributed servers (ie, Amazon EC2 instances)

Created 13 years ago by Luis Lobo Borobia Luis Lobo Borobia, updated 9 years ago by Luis Lobo Borobia Luis Lobo Borobia. 0 comments

We are running one frontend running NGINX and several app servers running Apache2. There are several issues we have come across but right now I'll be documenting one of them. I'll be completing this article when I get more time.

2 0
2
Viewed: 18 416 times
Version: all
Category: Tips

Adding Yii Search to Your Browser Search Box

Created 15 years ago by qiang qiang, updated 8 years ago by CeBe CeBe. 1 comment

The official Yii project site now supports OpenSearch. This means you can customize your browser's search box to enable direct search of the content in yiiframework.com. For example, by entering a Yii class name in the browser's search box, the corresponding class API page will be shown in the browser.

25 0
6
Viewed: 71 055 times
Version: all
Category: Tips