flaravel / cool-admin-api
基于Laravel的Cool-Admin Server Api
1.1
2022-02-24 06:06 UTC
Requires
- illuminate/container: ^6.0 || ^7.0 || ^8.0 || ^9.0
- php-open-source-saver/jwt-auth: ^1.4
Requires (Dev)
- phpunit/phpunit: ^9.5
This package is auto-updated.
Last update: 2025-03-24 12:46:00 UTC
README
当第一眼看到 Cool-Admin 就被它的颜值惊艳到了
官方只有node和java版本的server api,于是基于Laravel做了权限管理模块
安装
composer require flaravel/cool-admin-api
配置文件
php artisan vendor:publish --tag=cool-admin
迁移
php artisan migrate
初始化数据
php artisan vendor:publish --tag=cool-seeder
php artisan db:seed --class=CoolAdminSeeder
生成jwt密钥
php artisan jwt:secret
前端
github: https://github.com/flaravel/cool-admin-vue
代码拉取下来之后更改代理配置(在 vite.config.ts文件 中), 更改成当前你的后面请求地址
const proxy = { "/dev": { target: "请求服务端的url", changeOrigin: true, rewrite: (path: string) => path.replace(/^\/dev/, "") }, "/pro": { target: "https://show.cool-admin.com", changeOrigin: true, rewrite: (path: string) => path.replace(/^\/pro/, "/api") } };
更改完运行就能看到如下界面:
演示地址
管理员:
- admin
- password
测试:
- test
- password