Wiki articles in category Tips

Showing 1-20 of 36 items.

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

Created 9 years ago by Deepak Pradhan, updated 9 years ago by Deepak Pradhan.

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: 9 086 times
Version: 2.0
Category: Tips

Interview Questions For YII2

Created a year ago by aayushmhu, updated 4 months ago by aayushmhu.

Hey Everyone, In this post I Just shared my Experience what most of interviewer ask in YII2 Interview.

2 0
2 followers
Viewed: 54 377 times
Version: 2.0
Category: Tips
Tags: interview

Convert JSON data to html table for display on page

Created a year ago by shiv.

I have a calls which help me display json directly in html table.

0 0
1 follower
Viewed: 67 955 times
Version: all
Category: Tips
Tags: html, JSON

GridView show sum of columns in footer.

Created a year ago by shiv.

GridView show sum of columns in footer `PHP use yii\grid\DataColumn;

1 0
1 follower
Viewed: 67 687 times
Version: 2.0
Category: Tips

YII2 Pagination Options

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

solution here If we are using default pagination option like

1 0
1 follower
Viewed: 18 250 times
Version: 2.0
Category: Tips

Using PayPal IPN with Yii2

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

I'm using PayPal's script from

0 0
1 follower
Viewed: 12 970 times
Version: 2.0
Category: Tips

Customize your Growl/Alert msg easy and quickly

Created 8 years ago by Scott_Huang, updated 8 years ago by Scott_Huang.

I leverage Kartik's notification widgets.

0 1
2 followers
Viewed: 15 831 times
Version: 2.0
Category: Tips

Building a search GET request with scenarios ; calling a SearchModel from URLs...

Created 8 years ago by Louis Gac, updated 8 years ago by Louis Gac.

Search Models are a very elegant and powerful way to build an Active Data Provider. If you use them a lot, you'll quickly need to use scenarios, which will lead you to a very DRY Controller code.

0 0
2 followers
Viewed: 22 251 times
Version: 2.0
Category: Tips

Load & Save With Relation

Created 8 years ago by moo.tensai, updated 8 years ago by moo.tensai.

Use this extension : yii2-relation-trait

1 0
2 followers
Viewed: 17 690 times
Version: 2.0
Category: Tips

Yii2: Query build for complexity SQL

Created 8 years ago by Scott_Huang, updated 8 years ago by Scott_Huang.

As for complexity SQL query we have two solutions as below, I will discuss #2 in this article.

0 0
3 followers
Viewed: 39 046 times
Version: 2.0
Category: Tips

REST API and null values in XML

Created 7 years ago by marko60, updated 7 years ago by marko60.

I have been working on a REST API using the excellent tools provided by Yii2. My problem was that I have to differentiate between empty values and null values. In other words, <elem></elem> is different from null as it represents an empty string. Also, although some use <elem/> to represent a null value it should still be interpreted as an empty string. In other cases, the absence of the eleme...

0 0
0 follower
Viewed: 19 460 times
Version: 2.0
Category: Tips
Tags: null, REST, XML

Auto-update denormalized attributes with MongoDb and Yii2

Created 10 years ago by edoardo849, updated 9 years ago by CeBe.

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: 17 562 times
Version: 2.0
Category: Tips

My Own Components Folder in Yii2

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

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

Locking your Yii 2 project package versions with composer.lock

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

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: 16 537 times
Version: 2.0
Category: Tips

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

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

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: 43 199 times
Version: 2.0
Category: Tips

Model validation for field ranges using yii2-field-range extension

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

The yii2-field-range extension enables you to easily setup ActiveField range fields with Bootstrap styling. You basically can setup two attributes joined together like a single field with combined validation error block.

0 0
37 followers
Viewed: 27 586 times
Version: 2.0
Category: Tips

embedded javascript block in your view with IDE checking or intellisense

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

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

2 0
3 followers
Viewed: 13 024 times
Version: 2.0
Category: Tips

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

Created 10 years ago by Luis Lobo Borobia, updated 6 years ago by Luis Lobo Borobia.

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: 14 392 times
Version: all
Category: Tips

Easy way to redirect http:\\localhost\yii2-basic to http:\\localhost\yii2-basic\web\index.php

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

First of all, install yii2 basic template according below link:

1 0
5 followers
Viewed: 70 228 times
Version: 2.0
Category: Tips

Yii2 Report Grid

Created 6 years ago by Chris Backhouse, updated 6 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: 33 370 times
Version: 2.0
Category: Tips