Hello,
If you want to give extra attention for some specific delete actions and you don't want to override whole yii.confirm JS method here is what you can do:
(I've only put the ActionColumn part of the GridView here to just give you the idea)
Assume we have many categories and many posts.
common\components\LanguageSelector.php
<?php
namespace common\components;
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.
namespace app\components;
It can happen that you work in development environment and you make changes to database tables structures, adding tables, or changing fields.
To use jui auto complete widget first add
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.
As for complexity SQL query we have two solutions as below, I will discuss #2 in this article.
The Google mapping extension by Dos Amigos (link) is really great but there are difficulties with Google maps when you want to manipulate your map object with Ajax.
It's easy to execute migration locally on XAMPP using cmd, but on server where you script is it's little bit harder.
We can easily have a multilingual site if we put a "lang" parameter that comes via GET. For example:
There are numerous usability problems:
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.
I was playing around with another PHP framework which I didn't really liked anyway but it had simple and nice integration for PHP built in web server so I decided to write one for Yii (since this is my primary PHP framework)
To generate excel by query content, and download through any controller. You also can bind cssClass to header/odd/even rows. As for header, you even can set cssClass for each column.
$this->export2excel($excel_content,$excel_file);
in your controller.
Use this extension : yii2-relation-trait
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.