Skip to content

Instantly share code, notes, and snippets.

View breda's full-sized avatar

B. Reda breda

View GitHub Profile
@cherifGsoul
cherifGsoul / Db.php
Last active July 27, 2016 22:43
Proof of concept and example how to implement facades for yii2 components
<?php
namespace app\components\facades;
/**
* Example how to use the facade class
* uses yii\db\Connection
*/
class Db extends Facade
{
@djoudi
djoudi / 01_Laravel 5 Simple ACL manager_Readme.md
Created October 30, 2015 20:56 — forked from amochohan/01_Laravel 5 Simple ACL manager_Readme.md
Laravel 5 Simple ACL - Protect routes by an account / role type

#Laravel 5 Simple ACL manager

Protect your routes with user roles. Simply add a 'role_id' to the User model, install the roles table and seed if you need some example roles to get going.

If the user has a 'Root' role, then they can perform any actions.

Installation

Simply copy the files across into the appropriate directories, and register the middleware in App\Http\Kernel.php