Wiki articles

Showing 1-20 of 148 items.
Created 10 days ago by samdark.

Using multiple models in an identity

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.

2 0
1 follower
Viewed: 859 times
Version: 2.0
Category: How-tos
Created a month ago by Daniel.

Update and Delete buttons on Breadcrumb

The definition of breadcrumbs according to its documentation is as follow: Breadcrumbs displays a list of links indicating the position of the current page in the whole site hierarchy.

0 0
1 follower
Viewed: 1 447 times
Version: 2.0
Category: Tips
Created 2 months ago by CeBe, updated 2 months ago by CeBe.

Getting information from the current locale

Yii 2.0 comes with a formatter component to format dates, numbers, and other values for international users according to their locale. This is very useful for displaying data. When working with incoming data or when using enhanced input methods like the [MaskedInput widget](https://www.yiiframework.com/doc/api/2.0/yii-widgets-maskedinp...

5 0
2 followers
Viewed: 1 699 times
Version: 2.0
Category: How-tos
Created 3 months ago by Necip, updated 2 months ago by Necip.

An alternative way to ElasticSearch

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: 2 926 times
Version: all
Category: How-tos
Created 2 months ago by s.oli, updated a month ago by samdark.

How to organize Design "things" in Yii 2 (themes and layout)

Sometimes the App needs a nicer look & feel, so its necessary to organize the assets for this and Yii can help a lot to make it easy. In this article I provide tips for handling multiple "Designs". I use these three features:

1 0
2 followers
Viewed: 3 558 times
Version: 2.0
Category: Tips
Created 6 months ago by Luis Armando, updated 3 months ago by Maurizio Domba Cerin.

Use non Gmail/Gsuite on Gcloud projects

Small companies and startups use cheap email services or even Cpanel's mail services which are less secure and compete directly with bigger email providers like Microsoft with Outlook and Google with Gmail. This creates a problem when you try to use their services to send/receive emails from this cheap services. <img width="750" src="https://static.techspot.com/fileshost/newspics3/2017/google-clo...

0 0
2 followers
Viewed: 4 304 times
Version: 2.0
Category: How-tos
Created 3 years ago by Deepak Pradhan, updated 3 years ago by Deepak Pradhan.

Analyse the server's USER-AGENT against browsecap file to determine it's capability.

Does your application need to know user's details on browser details, os and device type? We can use PHP's misc. function to achieve that provided you have an update copy of browsercap.ini

0 0
0 follower
Viewed: 4 596 times
Version: 2.0
Category: Tips
Created 2 months ago by samdark.

When to use Active Record

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

6 0
2 followers
Viewed: 5 422 times
Version: all
Category: FAQs
Created 5 months ago by hehbhehb, updated 2 months ago by CeBe.

Pjax GridView: refresh page after delete

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.

5 0
2 followers
Viewed: 6 063 times
Version: 2.0
Category: How-tos
Created 2 years ago by Alexandre Rodichevski, updated 2 years ago by Alexandre Rodichevski.

A universal model attribute for its synthetic representation

It is convenient to use the same identification attribute, say info, in all of the active records of your application. It should be a virtual read-only attribute defined by a getter method, its label being the model name.

0 0
3 followers
Viewed: 6 356 times
Version: 2.0
Category: Tips
Created 4 years ago by jcagentzero, updated 4 years ago by jcagentzero.

Automatically get the SVN Revision Number of your Project

When you are handling so many projects and those projects are saved in different repository locations, you may find it very difficult to keep track all the versions and revisions manually and it will be much harder if you are developing in multiple repository branches.

3 0
4 followers
Viewed: 6 761 times
Version: all
Category: Tutorials
Created 3 years ago by schmunk, updated 3 years ago by schmunk.

`forceCopy` per Asset Bundle

During development and depending on your setup you may need to use the options forceCopy or linkAssets of the asset manager to work around possible file-system and permission issues.

1 0
1 follower
Viewed: 6 767 times
Version: 2.0
Category: How-tos
Created 4 years ago by yiqing95, updated 4 years ago by yiqing95.

embedded javascript block in your view with IDE checking or intellisense

this is my way for embed js code block in view file:

1 0
3 followers
Viewed: 7 184 times
Version: 2.0
Category: Tips
Created 4 years ago by Asmaa, updated 4 years ago by Asmaa.

How to display images in CJuiAutoComplete without extenstions

I wanted to customize the CJuiAutoComplete, so that it displays a thumb image before the label like the one shown in the following image:

0 0
1 follower
Viewed: 7 245 times
Version: all
Category: Tutorials
Created 3 years ago by darioo, updated 3 years ago by darioo.

Using PayPal IPN with Yii2

I'm using PayPal's script from

0 0
1 follower
Viewed: 7 736 times
Version: 2.0
Category: Tips
Created 2 years ago by emrald, updated 2 years ago by emrald.

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

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.

0 0
3 followers
Viewed: 7 799 times
Version: 2.0
Category: Tutorials
Created 5 years ago by Luis Lobo Borobia, updated a year 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 886 times
Version: all
Category: Tips
Created 2 years ago by Fabrizio Caldarelli, updated 2 years ago by Fabrizio Caldarelli.

MySQL migration environment

It can happen that you work in development environment and you make changes to database tables structures, adding tables, or changing fields.

0 0
2 followers
Viewed: 8 001 times
Version: 2.0
Category: How-tos
Created 2 years ago by Scott_Huang, updated 2 years ago by Scott_Huang.

A simple widget - jump2link

namespace app\components;

0 0
1 follower
Viewed: 8 130 times
Version: 2.0
Category: Tutorials
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: 8 414 times
Version: 2.0
Category: Tips