bestmomo/laravel-installer
Composer 安装命令:
composer require bestmomo/laravel-installer
包简介
Helper for Laravel 5.2 application installation
README 文档
README
For Laravel 5.3 look at this repository.
There is already a helper package for Laravel application installation. It's great but is not what I need because final people are not developpers and they must have informations that they can understand. On the other hand I think it's usefull to manage the possibility to register an administrator in the installation phase.
So I have developed this alternative package with final user in mind.
There is a (french) presentation there.
Features
- point base url to installator route
- check PHP version
- check folders permissions
- check server requirements
- allow application publication
- get the database settings with a form
- migrate the database
- seed the database (if needed)
- optionaly get basic informations (set in config) for administrator creation with a form
- allow saving complementary informations fo administrator (for example roles)
- set an unique security key for application
- remove service provider reference in config to delete the installation stuff
Installation
Add Installer to your composer.json file to require it :
require : {
...
"bestmomo/laravel-installer": "0.1.*"
}
Update Composer :
composer update
The next required step is to add the service provider to config/app.php :
Bestmomo\Installer\InstallerServiceProvider::class,
Publish
The last required step is to publish views, translations and configuration in your application with :
php artisan vendor:publish
Configuration
Views
View are in resources/views/vendor/installer, you can customize them as you want.
Translations
Translations are in resources/lang/* in installer.php file. You can customize them as you want and add other languages (default are only en and fr).
Configuration
Configuration is in config/installer.php :
- Application name : the name of the application
- Application version : the version number of the application
- PHP version : you can set newer version if you need for your application (dont forget to update lang files too)
- Server requirements : add other requirements if you need for your application
- Permissions : add other permissions if you need for your application
- Publish path : if you have to publish directories and files set the path (default is
null). For example you have ablogdirectory with folders, subfolders and files at the root, set this value :
'publish-path' => base_path('blog'),
Take care that any file with same name will be changed for the new one.
- Login url : set the login url for button at the end of installation
- Administrator : set
trueif you want administrator creation with installation. Set also thefieldsif default values dont suit. But take care that these fields must fit thecreatemethod of AuthController (or your form request) because package uses this method to create the administrator. If you use form request for validation set it in validator configuration. If you use a custom creator method set it in creator configuration.
To add other informations to administrator as roles you can create this method in AuthController :
protected function userAddValues(User $user)
{
// Add elements to administrator record there
}
The user model is provided as method parameter so you can easily set a query.
Todo list
- Screenshots
bestmomo/laravel-installer 适用场景与选型建议
bestmomo/laravel-installer 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 3.4k 次下载、GitHub Stars 达 16, 最近一次更新时间为 2016 年 02 月 09 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 bestmomo/laravel-installer 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 bestmomo/laravel-installer 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 3.4k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 16
- 点击次数: 3
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-02-09