Modern browsers support SVG, older browsers do not. This replacement for CHtml::image() allows you to handle to propose SVG in an efficient way with PNG as a fallback.
Modern browsers support SVG, older browsers do not. This replacement for CHtml::image() allows you to handle to propose SVG in an efficient way with PNG as a fallback.
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
yii rights some tips..
Hey Everyone, In this post I Just shared my Experience what most of interviewer ask in YII2 Interview.
Here are all wiki articles from "Understanding" series by Yii wiki contributors:
I have a calls which help me display json directly in html table.
GridView show sum of columns in footer
`
PHP
use yii\grid\DataColumn;
solution here If we are using default pagination option like
Your application is international and you have to select the best language for the user. Your user may have selected 'fr_CA' and you have 'fr_FR' or 'fr' available. What do you do? Here is a tip.
So you want to use CForm (form builder), but need to preload dropdowns in a form? It's simpler than it seems.
You got your CFormModel, CForm and the actual Form, right?
Let's say you have the typical State -> City dependent dropdowns, so you would want to load the from with the State and City selected.
I faced many issues when hosted our company website on AppFog.
I'm using PayPal's script from
Hi Friends, Hi Friends, Some common question is difficult to how to create the layout on yii and how to work
I leverage Kartik's notification widgets.
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.
Use this extension : yii2-relation-trait
As for complexity SQL query we have two solutions as below, I will discuss #2 in this article.
Lately, i needed to deal with the following scenario: read from two databases (db1,db2), and write to a third database (db3).