namespace app\components;
namespace app\components;
To use jui auto complete widget first add
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.
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.
One of the common tasks the web application might be required to perform, especially the app using some kind of a CMS, is to save the history of data changes. Your client for sure will want the answer to this simple question - If I mess this up or delete by accident can we bring it back? Well, DB backup is one thing and quick recovery is another - let's talk about latter one.
When building PHP web applications you usually have to take care about defining and providing a consistent development and production environment for your team. This includes your application packages, PHP-extensions, database servers and often further components such as a mail server or workers.
This article tries to describe the practical techniques of searching by a HAS_MANY relation using ActiveRecord of Yii 2.0.
Example settings when using Gettext for i18n.
One of the common requests I see in the forum is how to implement RBAC. While you can implement Yii 2's built-in RBAC, that might be too much for developers who are just starting with Yii 2 or have simpler needs. Sometimes you are looking for a fast solution and just want two flavors, user and admin. And even if you will eventually need more, you can use these methods as a starting point for devel...
This tutorial need extension mdmsoft/yii2-upload-file. Follow the intruction to install.
After installation done, create controller
and action
Imagine adds most common image functions and also acts as a wrapper to Imagine image manipulation library.
I wanted to customize the CJuiAutoComplete, so that it displays a thumb image before the label like the one shown in the following image:
This is wiki page is useful if you are trying to build a customized REST API in Yii2.0
Translation from .txt file Note:
Hi Friends, In this tutorial I write a code display dependent drop-down value using ajax call.
In this wiki I will show how could forcing login for all pages and users must be logged in to access almost all of the site’s content.
Hi Friends,
In this wiki I will show how to create own custom global function. It may be save the space and reduce the time.