https://github.com/jjanampa/laravel-admin
Laravel admin dashboard
https://github.com/jjanampa/laravel-admin
admin admin-dashboard bootstrap4 laravel laravel-modules material-dashboard php
Last synced: 11 months ago
JSON representation
Laravel admin dashboard
- Host: GitHub
- URL: https://github.com/jjanampa/laravel-admin
- Owner: jjanampa
- License: mit
- Created: 2021-01-03T23:06:56.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2021-07-15T05:16:02.000Z (almost 5 years ago)
- Last Synced: 2025-07-01T22:07:48.257Z (12 months ago)
- Topics: admin, admin-dashboard, bootstrap4, laravel, laravel-modules, material-dashboard, php
- Language: CSS
- Homepage: https://packagist.org/packages/jjanampa/laravel-admin
- Size: 12.3 MB
- Stars: 23
- Watchers: 5
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# laravel-admin
Laravel Admin is a drop-in admin panel package for Laravel which promotes rapid scaffolding & development, uses [Material Dashboard](https://www.creative-tim.com/product/material-dashboard-laravel)
* The project is based on the [Laravel Admin Panel](https://github.com/appzcoder/laravel-admin) and [Material Dashboard Laravel](https://github.com/creativetimofficial/material-dashboard-laravel).
* This package has a modular approach, for which it uses the Laravel module, see the documentation for more information on this approach: https://github.com/nWidart/laravel-modules
* Installing this package will publish the `Admin` module in the `Modules` folder at the root of your project.

### Requirements
Laravel >=7
PHP >= 7.0
### Features:
1. Admin User, Role & Permission Manager:
2. Activity Log:
3. Page CRUD:
4. Settings:
5. Login, Forgot Password
6. Profile
#### Packages used:
- [Laravel-Modules](https://github.com/nWidart/laravel-modules)
- [Laravel UI](https://github.com/laravel/ui)
- [laravelCollective HTML](https://github.com/LaravelCollective/html)
- [Laravel-activitylog](https://github.com/spatie/laravel-activitylog)
#### Assets used:
- [Bootstrap 4](https://getbootstrap.com)
- [Material Dashboard](https://github.com/creativetimofficial/material-dashboard)
--------
## Installation
After initializing instance of Laravel
1. Autoloading: By default, module classes are not loaded automatically. You can autoload your modules using `psr-4`, add `"Modules\\": "Modules/"` in
**composer.json**.
``` json
{
"autoload": {
"psr-4": {
"App\\": "app/",
"Modules\\": "Modules/",
}
}
}
```
**Tip: don't forget to run `composer dump-autoload` afterwards.**
2. Run
```
composer require jjanampa/laravel-admin
```
3. Install the admin package.
```
php artisan laravel-admin:install
```
> Service provider will be discovered automatically.
> execute `php artisan laravel-admin:install --force` to force the installation, this process recreate the `Admin` module, removes and recreates the following tables:
`admin_users, admin_roles, admin_permissions, admin_permission_role, admin_role_user, pages, settings`
### Logging In
Visit `(APP_URL)/admin` to access the admin panel.
The default admin login is:
Email Address: admin@admin.com
Password: secret
## Usage
1. Create some permissions.
2. Create some roles.
3. Assign permission(s) to role.
4. Create user(s) with role.
5. For checking authenticated user's role see below:
```php
// Check role anywhere
if (auth('admin')->user()->hasRole('editor')) {
// Do admin stuff here
} else {
// Do nothing
}
// Check role in route middleware
Route::resource('pages', 'Dashboard\PagesController')->middleware('role:editor');
```
6. For checking permissions see below:
```php
if (auth('admin')->user()->can('permission-name')) {
// Do something
}
```
Learn more about ACL from [here](https://laravel.com/docs/master/authorization)
For activity log please read `spatie/laravel-activitylog` [docs](https://docs.spatie.be/laravel-activitylog/v2/introduction)
## Screenshots
| Admin Users | Admin Roles | Admin Permissions |
| --- | --- | --- |
|  |  | 
| Pages | Activity Log | Settings |
|  |  | 
| Profile | Login| Forgot Password |
|  |  | 