Skip to content

ddmtechdev/rbac

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🔐 RBAC Module Installation Guide

Follow this guide to install and configure the ddmtechdev/rbac module in your Yii2 application.


📌 Installation Steps

1️⃣ Install the Package

Run the following command to install the RBAC module via Composer:

php composer require ddmtechdev/rbac:@dev

2️⃣ Run Migrations

Apply the necessary database migrations:

php yii migrate/up --migrationPath=@vendor/ddmtechdev/rbac/migrations

3️⃣ Configure the Application

Modify your common/config/main.php file and add the following inside the modules array:


'modules' => [
    'rbac' => [
        'class' => 'ddmtechdev\rbac\Module',
    ],
    ...
],

4️⃣ Configure the Console Application

Modify your console/config/main.php file and add the following inside the controllerMap array:


'controllerMap' => [
    'rbac-seeder' => [
        'class' => 'ddmtechdev\rbac\console\RbacSeeder',
    ],
    ...
],

5️⃣ Add Repository & Autoloading

To ensure proper loading of the module, open composer.json and update it as follows:

📌 Add Repository


"repositories": [
    {
        "type": "vcs",
        "url": "https://github.com/ddmtechdev/rbac.git"
    }
    ...
]

📌 Configure Autoloading


"autoload": {
    "psr-4": {
        "ddmtechdev\\rbac\\": ""
    }
    ...
},

✅ Final Steps

  • 🔹 Flush cache (to apply changes):
  • php yii cache/flush-all
  • 🔹 Run RBAC seeder (to initialize roles & permissions):
  • php yii rbac-seeder/init
  • 🔹 Restart the web server (if necessary)
  • 🔹 Access the RBAC module via your configured routes

🎉 Your RBAC Module is Now Installed & Configured!

If you encounter any issues, check the logs or verify that dependencies are correctly installed. 🚀

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages