Wiki articles

Showing 141-160 of 166 items.

Pjax on ActiveForm and GridView - Yii2

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

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

7 0
16 followers
Viewed: 172 839 times
Version: 2.0
Category: How-tos

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

Created 9 years ago by Wade Shuler Wade Shuler, updated 6 years ago by jwerner 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
6 followers
Viewed: 40 597 times
Version: 2.0
Category: How-tos

Nested Set with Yii2

Created 6 years ago by sangprabo sangprabo, updated 6 years ago by sangprabo sangprabo.

The nested set behaviour is an approach to store hierarchical data in relational databases. For example, if we have many categories for our product or items. One category can be a "parent" for other categories, means that one category consists of more than one category. The model can be drawn using a "tree" model. There are other approaches available but what we will learn in this article is speci...

7 0
3 followers
Viewed: 93 403 times
Version: 2.0
Category: Tutorials
7 0
4 followers
Viewed: 370 491 times
Version: 2.0
Category: Tutorials

Yii v2 snippet guide III

Created 4 years ago by rackycz rackycz, updated 5 months ago by rackycz rackycz.

Articles are separated into more files as there is the max lenght for each file on wiki.

8 0
4 followers
Viewed: 238 925 times
Version: 2.0
Category: Tutorials

Use kartik Growl with Yii2 flash messages

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

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

8 0
11 followers
Viewed: 51 793 times
Version: 2.0
Category: How-tos

YII2: Create console commands inside a module or extension

Created 10 years ago by MetaCrawler MetaCrawler, updated 7 years ago by Luis Armando 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: 71 011 times
Version: 2.0
Category: Tutorials

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

Created 7 years ago by toaster toaster, updated 7 years ago by toaster 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...

8 0
2 followers
Viewed: 38 514 times
Version: 2.0
Category: Tutorials

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

Created 10 years ago by robregonm robregonm, updated 10 years ago by robregonm 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.

9 0
6 followers
Viewed: 37 589 times
Version: 2.0
Category: How-tos

Tutorial about How to Integrate Yii2 with fantastic theme AdminLTE

Created 11 years ago by ThePr0f3550r ThePr0f3550r, updated 11 years ago by YiiJeka 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"

9 0
22 followers
Viewed: 137 723 times
Version: 2.0
Category: How-tos
10 0
15 followers
Viewed: 47 437 times
Version: all
Category: Others

How to use GridView with AJAX

Created 11 years ago by Antonio Ramirez Antonio Ramirez, updated 7 years ago by CeBe 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.

10 0
15 followers
Viewed: 91 942 times
Version: 2.0
Category: How-tos
Tags: pjax, widget, yii2

Relational Query - Lazy Loading and Eager Loading in Yii 2.0

Created 10 years ago by softark softark, updated 6 years ago by samdark 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.

11 0
6 followers
Viewed: 63 619 times
Version: 2.0
Category: Tutorials

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

Created 11 years ago by raminious raminious, updated 11 years ago by jim. 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)

11 0
22 followers
Viewed: 132 951 times
Version: 2.0
Category: How-tos

Move sources to src

Created 6 years ago by samdark samdark, updated 6 years ago by samdark samdark.

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

12 0
5 followers
Viewed: 17 336 times
Version: 2.0
Category: How-tos

Yii2 - Upgrading to Bootstrap 4

Created 5 years ago by Richard Pillay Richard Pillay, updated 5 years ago by Richard Pillay Richard Pillay.

Yii2 - Converting from Bootstrap3 to Bootstrap4

12 0
6 followers
Viewed: 116 210 times
Version: 2.0
Category: How-tos

Drills : Search by a HAS_MANY relation in Yii 2.0

Created 11 years ago by softark softark, updated 7 years ago by softark softark.

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

13 0
14 followers
Viewed: 111 720 times
Version: 2.0
Category: Tutorials

When to use Active Record

Created 7 years ago by samdark samdark, updated 5 years ago by samdark samdark.

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

13 0
4 followers
Viewed: 55 349 times
Version: all
Category: FAQs

Show raw SQL query

Created 9 years ago by darioo darioo, updated 9 years ago by darioo darioo.

Here's a quick tip to dump the SQL for query.

20 1
5 followers
Viewed: 263 443 times
Version: 2.0
Category: FAQs

JWT authentication tutorial

Created 4 years ago by Allan Jensen Allan Jensen, updated 4 years ago by Allan Jensen Allan Jensen.

JWT is short for JSON Web Token. It is used eg. instead of sessions to maintain a login in a browser that is talking to an API - since browser sessions are vulnerable to CSRF security issues. JWT is also less complicated than setting up an OAuth authentication mechanism.

14 0
8 followers
Viewed: 179 110 times
Version: 2.0
Category: Tutorials