https://github.com/devfaysal/laravel-admin
Roles/Permission UI for Laravel Application
https://github.com/devfaysal/laravel-admin
Last synced: about 1 year ago
JSON representation
Roles/Permission UI for Laravel Application
- Host: GitHub
- URL: https://github.com/devfaysal/laravel-admin
- Owner: devfaysal
- License: mit
- Created: 2019-11-16T06:08:07.000Z (over 6 years ago)
- Default Branch: main
- Last Pushed: 2024-06-20T04:29:22.000Z (about 2 years ago)
- Last Synced: 2025-05-10T13:51:57.407Z (about 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 3.21 MB
- Stars: 5
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Roles/Permission UI for Laravel Application

### Following packages/Libraries used
- [Laravel Permission by Spatie](https://github.com/spatie/laravel-permission)
- [Modular Admin Html](https://github.com/modularcode/modular-admin-html)
[](https://packagist.org/packages/devfaysal/laravel-admin)
[](https://travis-ci.org/devfaysal/laravel-admin)
[](https://scrutinizer-ci.com/g/devfaysal/laravel-admin)
[](https://packagist.org/packages/devfaysal/laravel-admin)
This is where your description should go. Try and limit it to a paragraph or two, and maybe throw in a mention of what PSRs you support to avoid any confusion with users and contributors.
## Installation
You can install the package via composer:
```bash
composer require devfaysal/laravel-admin
```
Then add the following middleware to the ``` $routeMiddleware ``` array in ``` app/Http/kernel.php ```
```php
'admin.auth' => \Devfaysal\LaravelAdmin\Http\Middleware\AdminAuthenticate::class,
'admin.guest' => \Devfaysal\LaravelAdmin\Http\Middleware\AdminRedirectIfAuthenticated::class,
'role' => \Spatie\Permission\Middlewares\RoleMiddleware::class,
'permission' => \Spatie\Permission\Middlewares\PermissionMiddleware::class,
'role_or_permission' => \Spatie\Permission\Middlewares\RoleOrPermissionMiddleware::class,
```
Publish Assets
```bash
php artisan vendor:publish --tag=laravel-admin-public
```
Publish Seeds
```bash
php artisan vendor:publish --tag=laravel-admin-seeders
```
Run Migration
```bash
php artisan migrate
```
Run seeder
```bash
composer dump-autoload
php artisan db:seed --class=LaravelAdminSeeder
```
## Usage
``` php
php artisan serve
```
Then visit localhost:8000/admin/login
username: hello@faysal.me
password: password
Additionally if you want to customize the blade view files and want to add other options and menu in the admin panel, you can publish the views and extend
```php
php artisan vendor:publish --tag=laravel-admin-views
```
If you want to add menu items in the sidebar menu, you need to create a file named ```menus.blade.php``` in your root view directoray.
It will automatically register menus in the sidebar.
For javascript and css, ```javascript.blade.php``` and ```styles.blade.php```
### Dashboard modification
To update Dashboard, register ```/admin/dashboard``` route and use your own controller and view.
If you want the current html design, check vendor folder and copy dashboard.blade.php file from ```resource/views``` folder inside the package.
#### Blade components
Add a stats section component:
``` php
```

Form field components
``` php
```
### Testing
``` bash
composer test
```
### Changelog
Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.
## Contributing
Please see [CONTRIBUTING](CONTRIBUTING.md) for details.
### Security
If you discover any security related issues, please email hello@faysal.me instead of using the issue tracker.
## Credits
- [Faysal Ahamed](https://github.com/devfaysal)
- [All Contributors](../../contributors)
## License
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.