PHP code example of elapse-annals / laravel-plus
1. Go to this page and download the library: Download elapse-annals/laravel-plus library . Choose the download type require .
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
elapse-annals / laravel-plus example snippets
$ 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 --init
php artisan serve
php artisan code:models --table=table_name // 指定表
php artisan code:models --connection=mysql // 指定数据库连接
php artisan code:models --connection=mysql --table=table_name // 指定连接和指定表
$env = config('dynamic.env');
$ sudo vim /etc/php/7.2/fpm/php.ini
// set opcache.enable=1
// ...
$ sudo service php5.6-fpm restart
$ sudo service nginx restart
npm run dev // 本地开发,开启 debug 模式
npm run prod // 线上部署(进行压缩资源)
npm run watch // 监视编译(开发时启用)
artisan ide-helper:generate
Schema::defaultStringLength(191);
shell script
php LaravelPlus/update YourProject
$ php artisan make:framework Tmpls // 创建分层结构(推荐)
$ php artisan make:framework Tmpls --D // 删除分层结构
$ php artisan make:framework Tmpls --F // 强制生成分层结构