bitpixel / springcms
基于Laravel的CMS
Requires
- php: ^8.1
- ext-zip: *
- alexusmai/laravel-file-manager: ^3.0
- czproject/git-php: ^4.2
- froiden/laravel-installer: 11.0.0
- ifsnop/mysqldump-php: ^2.12
- laravel/ui: ^4.2.3
- tightenco/ziggy: ^0.9.4
- unisharp/laravel-filemanager: ^2.6
Requires (Dev)
- nunomaduro/collision: ^6.0
- orchestra/testbench: ^7.0
- pestphp/pest: ^1.21
- pestphp/pest-plugin-laravel: ^1.1
- phpunit/phpunit: ^9.5
- spatie/laravel-ray: ^1.26
This package is auto-updated.
Last update: 2024-10-01 19:48:22 UTC
README
安装;
composer require bitpixel/springcms:dev-master
php artisan migrate
php artisan springcms:install
php artisan springcms:cache-views
要将资源(CSS、JS文件)发布到public目录,运行以下命令:
php artisan vendor:publish --tag=springcms-assets --force
运行以下命令以发布laravel-filemanager配置和资源:
php artisan vendor:publish --tag=lfm_config --force
php artisan vendor:publish --tag=lfm_public --force
这将生成config/lfm.php
。编辑此文件并将use_package_routes
设置为false
。
更新文件系统配置:打开config/filesystem.php
并将public磁盘更改为以下内容:
'public' => [ 'driver' => 'local', 'root' => public_path('springcms/assets/files'), 'url' => '/springcms/assets/files', 'visibility' => 'public', 'throw' => false, ],
运行项目:php artisan serve
打开管理面板:localhost:8000/admin/login
并使用在springcms:install
命令期间设置的凭证登录。
包更新路由
将以下路由添加到根项目的web.php
路由文件中。这在开发期间用于从共享托管环境中拉取最新代码。
Route::get('/upd', function () { $git = new CzProject\GitPhp\Git; \File::deleteDirectory(base_path('vendor/bitpixel/springcms')); $repo = $git->cloneRepository('https://github.com/bitpixelbd21/springcms.git', base_path('vendor/bitpixel/springcms')); die('Done!'); });
错误
语法错误或访问违规:1071 指定的键太长;最大键长度为1000字节 ==> 修复:https://stackoverflow.com/a/42245921
基本表或视图已存在:105 ==> 运行 php artisan migrate:fresh
开发
- 在根composer.json的"require"参数之后添加以下参数
"repositories": [ { "type": "path", "url": "./package/river", "options": { "symlink": true } } ],
错误: curl错误60,下载https://repo.packagist.org/p2/bitpixel/springcms.json时发生SSL证书问题:无法获取本地发行者证书
要修复此问题,请运行:composer config -g -- disable-tls false