Wiki articles

Showing 121-140 of 147 items.

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

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

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.

13 3
47 followers
Viewed: 144 973 times
Version: 2.0
Category: Tips

Filter & Sort by calculated/related fields in GridView Yii 2.0

Created 6 years ago by Kartik V, updated a year ago by softark.

This wiki explains how to add calculated fields into your Yii Framework 2.0 gridview with filtering and sorting.

11 2
63 followers
Viewed: 204 306 times
Version: 2.0
Category: Tutorials

Pjax on ActiveForm and GridView - Yii2

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

Here is a example on how to use Pjax with GridView (yii\grid\GridView) and ActiveForm (yii\widgets\ActiveForm) widgets in Yii2.

6 0
14 followers
Viewed: 130 893 times
Version: 2.0
Category: How-tos

Use minified version of JqueryAsset, BootstrapAsset (and all default assets)

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

By default, Yii 2.0 chooses to use the non-minified version of Jquery and Bootstrap files (CSS and JS). However, there's a simple way to indicate Yii to use the minified version.

6 0
5 followers
Viewed: 25 837 times
Version: 2.0
Category: How-tos

Use kartik Growl with Yii2 flash messages

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

This is to show you how to use Yii2 flash messages with Kartik Growl (bootstrap notify wrapper).

6 0
10 followers
Viewed: 40 158 times
Version: 2.0
Category: How-tos

Relational Query - Lazy Loading and Eager Loading in Yii 2.0

Created 4 years ago by softark, updated 9 months ago by samdark.

It's well known that there are Lazy Loading approach and Eager Loading approach in the relational query. But it's very important to know how the Eager Loading approach works in Yii 2. It has changed drastically from that of Yii 1.1, and there are common misunderstandings about it in the community.

6 0
6 followers
Viewed: 35 007 times
Version: 2.0
Category: Tutorials

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: 20 877 times
Version: 2.0
Category: Tips

Yii2 Report Grid

Created 2 years ago by Chris Backhouse, updated 2 years ago by Chris Backhouse.

There are some very advanced grids in the Yii2 community, specifically Kartik's amazing gridview extensions but they all designed for interactive screen use.

6 0
7 followers
Viewed: 23 754 times
Version: 2.0
Category: Tips

Pjax GridView: refresh page after delete

Created a year ago by hehbhehb, updated a year 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.

6 0
3 followers
Viewed: 20 651 times
Version: 2.0
Category: How-tos

Upload files in Yii2 with MongoDb and GridFs

Created 6 years ago by edoardo849, updated a month ago by pceuropa.

Uploading files in a webapp can be extremely tricky and sometimes the quickest way to do it is to store the file directly in the webserver or into a DNS (like Amazon S3) and then to save the link and the metadata inside a table in the DB. The thing is that you'll have to deal with file permissions, server storage, file management and so on (which is perfectly fine, by the way).

6 0
6 followers
Viewed: 24 694 times
Version: 2.0
Category: How-tos

Yii2: How to create/develop a new extension using Composer locally without version control or Git

Created 3 years ago by Wade Shuler, updated a year ago by jwerner.

Using a version control system, like Git, is nice. However, when building an extension from scratch and loading it via Composer, it adds a lot of pain in the butt steps. You have to commit your changes, update composer to pull them over, then notice there is an error, fix, commit, update. repeat.. I don't want all my baby steps under Git. Sure, I could edit my commit history, but c'mon. Just let m...

7 0
5 followers
Viewed: 23 295 times
Version: 2.0
Category: How-tos

YII2: Create console commands inside a module or extension

Created 4 years ago by MetaCrawler, updated a year ago by Luis Armando.

Here is a small guide how to get console commands running inside modules & extensions. For this guide I used a fresh yii2 basic application template.

8 0
6 followers
Viewed: 38 760 times
Version: 2.0
Category: Tutorials

Tutorial about How to Integrate Yii2 with fantastic theme AdminLTE

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

Yii2 comes with a charming twitter bootstrap version 3. But if it is less, then you can integrate with web templates that you like. One example is wonderfull template "adminLTE"

8 0
22 followers
Viewed: 114 303 times
Version: 2.0
Category: How-tos

How to hide /frontend/web in url addresses on apache

Created 5 years ago by raminious, updated 5 years ago by jim..

There is an issue on Yii2 to redirecting / urls to /frontend/web.
In other words we need a way to hidden /frontend/web from addresses.
We will do this without changing Apache configuration and creating virtual host or setting document root (It's good for share hostings that we have not access to apache.conf)

8 0
19 followers
Viewed: 105 179 times
Version: 2.0
Category: How-tos

Move sources to src

Created 7 months ago by samdark, updated 7 months ago by samdark.

Yii 3 and many Yii 2 package sources are contained within src directory which is convenient since you have less directories to check.

8 0
4 followers
Viewed: 4 937 times
Version: 2.0
Category: How-tos

How to use GridView with AJAX

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

With the adoption of PJax on Yii2 things  have change quite a bit with GridView when it comes to work with them in AJAX mode. It will probably be confusing at the beginning, but then you will soon realize how powerful the new approach is.

9 0
15 followers
Viewed: 73 459 times
Version: 2.0
Category: How-tos
Tags: pjax, widget, yii2

Batch Gridview data ajax send splitted in chunks displaying bootstrap Progress bar

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

The scenario in which this wiki can be useful is when you have to send an (huge) array of model ids and perform a time consuming computation with it like linking every model to other models. The idea is to split the array into smaller arrays and perform sequential ajax requests, showing the calculation progress using a [Bootstrap Progress bar](https://www.yiiframework.com/extension/yiisoft/yii2-bo...

9 0
3 followers
Viewed: 17 097 times
Version: 2.0
Category: Tutorials
10 0
15 followers
Viewed: 34 879 times
Version: all
Category: Others

When to use Active Record

Created a year ago by samdark.

When to use Active Record is a common question among developers, Yii and overall.

10 0
3 followers
Viewed: 43 356 times
Version: all
Category: FAQs

Drills : Search by a HAS_MANY relation in Yii 2.0

Created 5 years ago by softark, updated a year ago by softark.

This article tries to describe the practical techniques of searching by a HAS_MANY relation using ActiveRecord of Yii 2.0.

11 0
12 followers
Viewed: 80 826 times
Version: 2.0
Category: Tutorials