I just chased my tail around for a bit today. I got lost with setting the status of all inputs, and banging my head on why the "validate" function just wasn't working.
I just chased my tail around for a bit today. I got lost with setting the status of all inputs, and banging my head on why the "validate" function just wasn't working.
If you're using a lot of bower and npm assets with Yii 2.0 you might encounter long running composer update
tasks.
A Yii Framework 2 component for using assets in different environments (Local/CDNs)
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.
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