smallruraldog / admin
Webman plugin smallruraldog/admin
Installs: 12
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Language:JavaScript
Requires
- php: >=8.2
- illuminate/database: ^11.20
- illuminate/events: ^11.20
- illuminate/pagination: ^11.20
- monolog/monolog: ^2.0
- shopwwi/filesystem-oss: ^1.0
- shopwwi/webman-filesystem: ^1.1
- symfony/var-dumper: ^7.1
- vlucas/phpdotenv: ^5.6
- webman/captcha: ^1.0
- webman/console: ^1.3
- workerman/validation: ^3.1
- workerman/webman-framework: ^1.5.0
README
创建 webman 项目
composer create-project workerman/webman project-name
安装扩展
composer require smallruraldog/admin
更新扩展
composer update smallruraldog/admin
创建.env 文件
ADMIN_ROUTE_SUFFIX=admin ADMIN_DOMAIN= DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=webman-admin DB_USERNAME=root DB_PASSWORD= DB_SOCKET=
配置 database.php
return [ 'default' => 'mysql', 'connections' => [ 'mysql' => [ 'driver' => 'mysql', 'host' => getenv('DB_HOST'), 'port' => getenv('DB_PORT'), 'database' => getenv('DB_DATABASE'), 'username' => getenv('DB_USERNAME'), 'password' => getenv('DB_PASSWORD'), 'unix_socket' => getenv('DB_SOCKET'), 'charset' => 'utf8mb4', 'collation' => 'utf8mb4_unicode_ci', 'prefix' => '', 'strict' => true, 'engine' => null, ], ], ];
初始化数据,只需要在首次安装时执行
php webman smallruraldog-admin:install
发布资源文件,如果有更新,需要重新发布
php webman smallruraldog-admin:assets
启动项目
php start.php start
访问后台
http://0.0.0.0:8787/admin
加入文件监听
修改配置文件 config/process.php
加入以下代码到 monitorDir
数组中
base_path() . '/admin',
修改监进程文件 process\Monitor.php
注释掉以下两行代码
if (DIRECTORY_SEPARATOR === '/' && isset($this->loadedFiles[$file->getRealPath()])) { //echo "$file updated but cannot be reloaded because only auto-loaded files support reload.\n"; //continue; }