Wiki articles in category Tips

Showing 21-30 of 30 items.
Created 4 years ago by Kartik V, updated 4 years ago by Kartik V.

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

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 followers
Viewed: 21 755 times
Version: 2.0
Category: Tips
Created 4 years ago by Kartik V, updated 4 years ago by Kartik V.

Locking your Yii 2 project package versions with composer.lock

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 followers
Viewed: 7 591 times
Version: 2.0
Category: Tips
Created 4 years ago by CTala, updated 4 years ago by CTala.

My Own Components Folder in Yii2

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: 12 030 times
Version: 2.0
Category: Tips
Created 4 years ago by Kartik V, updated 4 years ago by toph.

FORM with GET method causes repeated stacking of URL Parameters

// 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(); `

2 2
40 followers
Viewed: 34 876 times
Version: all
Category: Tips
Created 4 years ago by Kartik V, updated 3 years ago by Kartik V.

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

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.

9 3
46 followers
Viewed: 113 711 times
Version: 2.0
Category: Tips
Created 4 years ago by Kartik V, updated 4 months ago by alrazi.

Activating Bootstrap 3 Tooltips & Popover for your Yii Site.

Step 1: Initialize the Bootstrap Tooltip & Popover plugins in your view layout file @web\views\layouts\main.php. Add this to somewhere in the beginning head section (after you have loaded the Jquery using your AppAsset or something similar).

1 2
47 followers
Viewed: 44 477 times
Version: 2.0
Category: Tips
Created 4 years ago by CTala, updated 4 years ago by CTala.

Yii2 default values for Index data Provider

Guys,

1 0
5 followers
Viewed: 21 252 times
Version: 2.0
Category: Tips
Created 4 years ago by edoardo849, updated 4 years ago by CeBe.

Auto-update denormalized attributes with MongoDb and Yii2

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 followers
Viewed: 10 500 times
Version: 2.0
Category: Tips
Created 4 years ago by Luis Lobo Borobia, updated 11 months ago by Luis Lobo Borobia.

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

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 followers
Viewed: 7 404 times
Version: all
Category: Tips
Created 7 years ago by qiang, updated a month ago by CeBe.

Adding Yii Search to Your Browser Search Box

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 followers
Viewed: 47 023 times
Version: all
Category: Tips