ahmmed / admin-ancillary
This package will check permission of admin user to control access in admin.
Installs: 41
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
Language:CSS
Requires
- php: ^7.3|^8.0
- laracasts/flash: ^3.0
- laravel/framework: ^9.0
README
Ahmmed/AdminAncillary
Laravel Ahmmed/AdminAncillary check the role based permissions to built in Auth System of Laravel 5. AdminAncillary protects routes and even crud controller methods.
Table of Contents
Requirements
Getting Started
Documentation
Contribution Guidelines
Requirements
This package requires PHP >=7.0.0
Getting Started
Installation
composer require ahmmed/admin-ancillary
Publish the package migrations,asset and views to your application
php artisan vendor:publish --provider="Ahmmed\AdminAncillary\AdminAncillaryServiceProvider"
After successful publish, Add the role relationship method and user_role fillable field to your User model.
public function role(){
return $this->hasOne(Role::class,'id','user_role');
}
and also add below lines into DatabaseSeeder file
$this->call(UserTableSeeder::class);
$this->call(MenuTableSeeder::class);
$this->call(RoleTableSeeder::class);
After that run
"php artisan migrate"
and
"php artisan db:seed"
Add the middleware to your app/Http/Kernel.php.
protected $routeMiddleware = [
'check_permission' => 'Ahmmed\AdminAncillary\CheckPermission',
];
If your application have no error view page then add error view page.
Also add DEFAULT_LOGO and DEFAULT_FAVICON in your .env file for upload logo and favicon in app settings
Documentation
Follow along the Wiki to find out more.
Contribution Guidelines
Support follows PSR-2 PHP coding standards, and semantic versioning.
Please report any issue you find in the issues page. Pull requests are welcome.