JF-Admin is a expansion package based on Laravel 5.5+ (supports Laravel 5.5+, 6.X, 7.X) to help you build your own background management system.
? Demonstration site:
https://jfadmin.imzhi.me/jfadmin/login, user name: admin, password: admin.
• Demonstration of screenshots:
content:
JF-ADMIN provides functions such as background login, authority control and operation log view. Permissions control adopt RBAC, including member management, role management, and authority management.
The front -end theme uses INSPINIA.
├── config
├── database
│ └── migrations
├── resources
│ ├── assets
│ │ ├── inspinia
│ │ └── jfadmin
│ ├── lang
│ │ ├── en
│ │ └── zh-CN
│ └── views
│ ├── auth
│ ├── home
│ ├── layouts
│ ├── manageuser
│ ├── profile
│ └── setting
└── src
├── Console
│ └── stubs
├── Controllers
├── Facades
├── Middleware
├── Models
├── Repositories
├── Requests
└── Seeds
Wrap name | Constraint | illustrate |
---|---|---|
MEWS/CAPTCHA | ^2.2 | Graphical verification code |
Spatie/Laravel -ActivityLog | ^2.8 | Operation log record |
Spatie/Laravel-Permission | ^2.37 | Permission control |
doctrine/annotations | ^1.8 | Annotation |
Issue orders
php artisan vendor:publish --provider= " ImzhiJFAdminJFAdminServiceProvider "
Publish the necessary files to the project:
├── config => config_path()
├── database
│ └── migrations => database_path('migrations')
├── resources
│ ├── assets => public_path('vendor/jfadmin')
│ │ ├── inspinia
│ │ └── jfadmin
│ ├── lang => resource_path('lang/vendor/jfadmin')
│ │ ├── en
│ │ └── zh-CN
│ └── views
│ ├── auth
│ ├── home => resource_path('views/vendor/jfadmin/home')
│ ├── layouts => resource_path('views/vendor/jfadmin/layouts')
│ ├── manageuser
│ ├── profile
│ └── setting
└── src
├── Console
│ └── stubs
├── Controllers
├── Facades
├── Middleware
├── Models
├── Repositories
├── Requests
└── Seeds
Installation command
php artisan jfadmin:install
First check whether the configuration file config/jfadmin.php
exists, and you need to use it during installation.
Execute the migration file and generate the initial administrator users (the default user name: admin, password: admin).
The new directory (default APP/jfadmin) and generate the background homepage controller file (HomeController) and Routes.php:
app
└── JFAdmin
├── Controllers
│ └── HomeController.php
└── routes.php
php artisan jfadmin:uninstall
After entering the above command, the confirmation prompt will be popped up. After the YES is typed, the operation will be uninstalled and will be deleted:
jfadmin::install
's new directory (default APP/JFADMIN)config_path('jfadmin.php')
public_path('vendor/jfadmin')
resource_path('lang/vendor/jfadmin')
resource_path('views/vendor/jfadmin')
Please note: Uninstall the command to change the data table. After the uninstallation is successful, if you need to reinstall it, please release the command first and then execute the installation command.
title
Site title
caption
Site title abbreviation (used when small screen browsing)
welcome
Welcome statement (welcome sentence in the upper right corner of the background homepage)
Wallpaper
The background map of the login page (supports URL and project accessable paths)
WallPaper_Class
CSS Class of the login page title file
directory
Installation Directory (JFADMIN :: Install command generates a directory to be installed)
The Laravel-ActivityLog packet used in the operating log records, the data table is Activity_log.
JF-Admin adds two new response macros: SUC and FAI, corresponding to the successful response macro and failure response macro, respectively, and the operating logs will be performed when the macro is successfully applied.
Please note: These two response macros are only applicable to the AJAX operation to return response data.
The name of the default super administrator is Super Admin, which can also set multiple super administrator characters in the configuration file.
The initial administrator account is a super administrator who can perform any operation.
JF-Admin has two important middleware: jfadmin.auth, jfadmin.permission.
JFADMIN.Auth detect user session login status and user account status.
JFADMIN.Permission detects the user's operating authority based on the routing name.
Reset password
php artisan jfadmin:reset-password
Enter the user name of the administrator to be modified, and enter the password and repeat password.
first step
Install the JF-Admin expansion package with Composer:
composer require imzhi/jf-admin ^1.1
Step 2
Release the migration file of the Laravel-Permission and Laravel-ActivityLog packets and execute the migration command:
php artisan vendor:publish --provider="SpatiePermissionPermissionServiceProvider" --tag="migrations"
php artisan vendor:publish --provider="SpatieActivitylogActivitylogServiceProvider" --tag="migrations"
php artisan migrate --step
Published the configuration file of the MEWS/CAPTCHA extension package:
php artisan vendor:publish --provider="MewsCaptchaCaptchaServiceProvider"
Modify the length of config/captcha.php
of configuration file, modify it to 4: 4:
return [
// 省略
' default ' => [
' length ' => 4 ,
Step 3
Release the file of the JF-Admin extension package and execute the installation command:
php artisan vendor:publish --provider="ImzhiJFAdminJFAdminServiceProvider"
php artisan jfadmin:install
After the above three steps, the expansion package is successfully installed.
The access of the URL is: http://xxx.xxx/jfadmin/login, the default user name: admin, password: admin: admin.
The JF-Admin expansion package uses the MIT license.