English | Chinese
plus
LaravelPlus adds some software package initial installation and business usage features based on Laravel to create an out-of-the-box application.
Configure composer aliyun image
$ composer config -g repo.packagist composer https: //mirrors.aliyun.com/composer/ $ git clone https : //github.com/ElapseAnnals/laravel-plus.git // A.在当前目录运行自动复制脚本 ( 推荐)
// YourProject 需要创建的项目名
$ php LaravelPlus /create YourProject $ cd YourProject // 进入 YourProject 项目中
$ composer update
$ php artisan make:framework init --initphp artisan serveTips:
php LaravelPlus/update YourProjectThe framework script creates content:
Model generation
php artisan code:models --table=table_name // 指定表
php artisan code:models --connection=mysql // 指定数据库连接
php artisan code:models --connection=mysql --table=table_name // 指定连接和指定表Use the framework function to create a CURL (Tmpls is the plural name of the corresponding model)
$ php artisan make:framework Tmpls // 创建分层结构(推荐)
$ php artisan make:framework Tmpls --D // 删除分层结构
$ php artisan make:framework Tmpls --F // 强制生成分层结构
Reproduction image: 
Tips:
After setting ENABLE_HOT_SWITCHING=true in .env, dynamic mapping will be performed in AppServiceProvider
How to use:
<?php
$ env = config ( ' dynamic.env ' );dynamic directory file description
Tips:
Optimize closures in default routes
$ sudo vim /etc/php/ 7.2 /fpm/php.ini
// set opcache.enable=1
// ...
$ sudo service php5 . 6 -fpm restart
$ sudo service nginx restartnpm run dev // 本地开发,开启 debug 模式
npm run prod // 线上部署(进行压缩资源)
npm run watch // 监视编译(开发时启用) Injecting vue components using mixin
< script >
var js_data = @ json ( $js_data ) ;
var mixinSlot = {
data : { } ,
methods : { }
}
</ script >
< script type =" text/javascript " src =" {{asset('js/app.js')}} " > </ script > Web is supported by permissions, middleware such as csrf and Session API token to use auth:api middleware or barryvdh/laravel-cors. If it is not a simple API, it is recommended to use web.
production environment
develop development environment
php artisan ide-helper:generate- Recommended extension
php-ext-xlswriter excel processing extensions, strong performance (300,000 rows 4 s)
Recommended package list
overtrue/laravel-lang multilingual localization i18n
[laravel/socialite] () Socialized login package [Pay attention to configuring the proxy or changing the underlying routing request] - Alternative overtrue/socialite includes domestic socialized login
rap2hpoutre/laravel-log-viewer log display [access host/logs]
respect/validation verification package
react/react ReactPHP multi-process asynchronous extension (manually, Process can only be used after introduction) - react/child-process - react/event-loop - Introducing ElasticSearch For scout - laravel/scout (manually)
elastic/elasticsearch-php Native ElasticSearch (manual)
predis/predis Redis plugin (Predis extension is recommended)
php-tool/laravel-plus-make Laravel Plus Make Automatically generate framework code plug-in software packages (manually)
darkaonline/l5-swagger swagger document generation
mpociot/laravel-apidoc-generator api doc document generation
nunomaduro/larastan Adds laravel static detection tool
guzzlehttp/guzzle Http request package
ClassPreloader/ClassPreloader vendor preload generator
-beyondcode/laravel-self-diagnosis laravel project diagnosisl -beyondcode/laravel-dump-server that collects all your dump call outputs -tightenco/jigsaw Active staticization-spatie/laravel-responsecache Staticization-silber/page-cache Staticization-barryvdh/laravel-httpcache Staticization
Increase front-end resources
Add the default image storage directory (storage/app/public/images)
Source of ideas for extended structure hierarchy
Set the default Schema index length
Use Schema Note that MySQL version is lower than 5.7.7 and needs to set the default index length less than 191
Schema:: defaultStringLength ( 191 );