Showing 21-40 of 268 items.

Relational Query - Lazy Loading and Eager Loading in Yii 2.0

Created 10 years ago by softark softark, updated 7 years ago by samdark samdark. 0 comments

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.

11 0
6
Viewed: 67 595 times
Version: 2.0
Category: Tutorials

Export query content to excel through any of your controllers, also can set cssClass for header/odd/even rows, auto download

Created 11 years ago by Scott_Huang Scott_Huang, updated 11 years ago by Scott_Huang Scott_Huang. 1 comment

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.

2 0
2
Viewed: 29 823 times
Version: 2.0
Category: Tutorials

Active Record snapshotting (Model data base history)

Created 11 years ago by Bizley Bizley, updated 11 years ago by Bizley Bizley. 3 comments

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.

1 0
5
Viewed: 20 231 times
Version: 1.1
Category: Tutorials

Running applications with Docker

Created 11 years ago by schmunk schmunk, updated 11 years ago by schmunk schmunk. 1 comment

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.

4 0
8
Viewed: 55 494 times
Version: 2.0
Category: Tutorials

RBAC Super Simple with Admin and User

Created 11 years ago by evercode evercode, updated 11 years ago by evercode evercode. 13 comments

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...

9 1
15
Viewed: 111 411 times
Version: 2.0
Category: Tutorials