Wiki articles

Showing 21-40 of 147 items.

Managing your nested dropdown dependency with DepDrop widget

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

If you are coming over to Yii 2 from Yii 1.x, you may have already read this useful wiki for creating dependent dropdowns. You can use a similar approach in Yii 2 to do the same. But if you are looking at a prebuilt solution that helps you manage it easier, read along.

2 3
42 followers
Viewed: 38 386 times
Version: 2.0
Category: Tutorials

Building a REST API in Yii2.0

Created 5 years ago by sirin k, updated 2 years ago by Maurizio Domba Cerin.

This is wiki page is useful if you are trying to build a customized REST API in Yii2.0

4 0
16 followers
Viewed: 132 999 times
Version: 2.0
Category: Tutorials

Simple way to implement Dynamic Tabular Inputs

Created 5 years ago by ezekielnoob, updated a year ago by samdark.

grid

3 0
10 followers
Viewed: 32 532 times
Version: 2.0
Category: Tutorials

Load data from internal/external source to fill form fields

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

This wiki is to show you how to use jQuery get and JSON to get data from a dropdown/any form field and fill form fields with the values instantaneously. First, I'll give example use cases of what I'm going to teach you so you can quickly see if this is for you.

1 0
5 followers
Viewed: 24 786 times
Version: 2.0
Category: How-tos

How to create/update a model with its related items using Listbox or CheckboxList

Created 4 years ago by softark, updated 2 years ago by softark.

Assume we have many categories and many posts.

4 0
6 followers
Viewed: 34 986 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: 21 297 times
Version: 2.0
Category: Tips

Using multiple models in an identity

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

Let's assume we have two models: Customer and Supplier and we want both to log in. Yii is quite flexible when it comes to authentication and authorization so it's possible.

8 2
3 followers
Viewed: 22 510 times
Version: 2.0
Category: How-tos

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.

12 0
13 followers
Viewed: 82 014 times
Version: 2.0
Category: Tutorials

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: 26 348 times
Version: 2.0
Category: How-tos

How to install Yii 2 advanced on a shared hosting environment

Created 4 years ago by oligalma, updated 10 months ago by oligalma.

I've read many comments that it's not possible to install Yii 2 advanced on a shared hosting environment, as it has two webroots. This is partially true.

3 0
2 followers
Viewed: 26 069 times
Version: 2.0
Category: How-tos

Simple Jui Autocomplete in yii2

Created 4 years ago by ajith, updated 4 years ago by ajith.

To use jui auto complete widget first add

0 0
3 followers
Viewed: 36 809 times
Version: 2.0
Category: Tutorials

How to make bootstrap tabs remain active/selected after navigating to different web pages.

Created 3 years ago by emrald, updated 3 years ago by emrald.

Bootstrap tabs gets unselected/inactive when user navigates to other page and comes back. How to make bootstrap tabs remain active/selected after navigating to different web pages.

1 0
3 followers
Viewed: 10 752 times
Version: 2.0
Category: Tutorials

Yii2 GridView Sorting and Searching with a Junction Table Column(Many to Many Relationship)

Created 3 years ago by Amjad Khan, updated 3 years ago by Amjad Khan.

Following is the table structure

tblgroups

CREATE TABLE IF NOT EXISTS `tblgroups` (
  `id` int(11) NOT NULL,
  `groupname` varchar(150) NOT NULL,
  `status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '1=Acitve,2=Inactive',
  `date` datetime NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

tblcontacts

2 1
6 followers
Viewed: 62 254 times
Version: 2.0
Category: Tutorials

How to login from different tables in Yii2

Created 2 years ago by AndroideLP, updated 19 days ago by lenovo.

The Problem: Yii2 utilizes by default UserIdentity configured in config/web.php for connection, this object apply one table to authentication ('identityClass' => 'app\panel\models\User'). How to authentication from diferent tables? Solution: Create instances in web.php to uses UserIdentify. eg:

5 0
6 followers
Viewed: 28 816 times
Version: 2.0
Category: How-tos

Using your own forked version of extensions with composer

Created 6 years ago by Kartik V, updated 4 years ago by Kartik V.

So you want to use a fork of any existing vendor extension with your Yii 2 install and use the fork, instead of original source. This does not need you to push any update or register your package on packagist.org. You are recommended to follow the approach below:

3 2
40 followers
Viewed: 18 061 times
Version: 2.0
Category: Tutorials

Managing a star rating with the StarRating widget in Yii 2

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

In Yii 1.x, there was a built in widget CStarRating based on the jquery star rating plugin. There exists no prebuilt solution in Yii2, however the same concepts can be extended using any jquery plugin.

1 3
41 followers
Viewed: 17 658 times
Version: 2.0
Category: How-tos

An alternative way to ElasticSearch

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

This article is for those who have dealt with the complexity of Elasticsearch or any other indexing machines and are looking for an easier way to index the existing database without additional effort.

1 0
2 followers
Viewed: 9 892 times
Version: all
Category: How-tos

Creating a Dependent Dropdown From Scratch in Yii2

Created 5 years ago by ThePr0f3550r, updated 2 years ago by alrazi.

I have read http://www.yiiframework.com/wiki/24/creating-a-dependent-dropdown/ (Dependen Dropdown Yii1), but I can't implement it in Yii2 because Yii2 does not have built-in AJAX functionality hem.. I searched about it and came across this post

4 1
11 followers
Viewed: 112 708 times
Version: 2.0
Category: How-tos

Write & use a custom Component in Yii2.0

Created 5 years ago by sirin k, updated 2 years ago by Maurizio Domba Cerin.

This is a simple example in Yii2.0 to understand how you can write a custom component and use it inside your app.(basic template)

13 0
11 followers
Viewed: 103 417 times
Version: 2.0
Category: How-tos

How to implement form events

Created 5 years ago by Antonio Ramirez, updated 4 years ago by deacs.

You have that, when a product is on development they can change its API anytime. This change is quite important though, its related on how to set the events of your form, for example, the useful beforeSubmit.

5 0
6 followers
Viewed: 28 501 times
Version: 2.0
Category: How-tos
Tags: Forms, How to, yii2