Showing 121-140 of 826 items.

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 260 times
Version: 2.0
Category: Tutorials

Use CGridview to sort and filter CSqlDataProvider - when used with UNRELATED tables (or complex queries)

Created 11 years ago by Gerhard Liebenberg Gerhard Liebenberg, updated 11 years ago by Gerhard Liebenberg Gerhard Liebenberg. 6 comments

I have two tables called hospitals and departments. I have a junction table between them which holds the departments in each hospital. But sometimes I need a list of "All hospitals with All possible departments" - regardless of whether they are linked in the junction table or not.

0 0
3
Viewed: 27 362 times
Version: 1.1
Category: How-tos

Yii configuration: Dynamic & User dependent

Created 11 years ago by le_top le_top, updated 11 years ago by le_top le_top. 0 comments

It is difficult to perform user dependent theming through a general configuration in 'main.php'. This article proposes a method to do so through a Factory that dynamically generates classes to allow delayed resolution of actual user values. This means that you can refer to values that are stored in the database through the CActiveRecord before Yii is actually loaded. The values will be fetched...

1 0
1
Viewed: 16 247 times
Version: 1.1
Category: How-tos

How to hide /frontend/web in url addresses on apache

Created 11 years ago by raminious raminious, updated 11 years ago by jim. jim.. 17 comments

There is an issue on Yii2 to redirecting / urls to /frontend/web.
In other words we need a way to hidden /frontend/web from addresses.
We will do this without changing Apache configuration and creating virtual host or setting document root (It's good for share hostings that we have not access to apache.conf)

11 0
22
Viewed: 136 719 times
Version: 2.0
Category: How-tos

Behaviour for Time Zone and Format conversion for Date, Time, timestamp, and datetime

Created 11 years ago by Smithesh Smithesh, updated 10 years ago by Smithesh Smithesh. 1 comment

This Behaviour helps to view time/date/timestamp/datetime from db to local Date / Time / Date Time format and in local Timezone. And save into db in with db timezone and db format. You only need to include this behaviour in models where need this facility.