Laravel Artisan Tinker: The optimize Command
Laravel Artisan Tinker: The optimize Command
December 7, 2016 Laravel
JOHN KOSTER
The optimize command optimizes various aspects to improve the performance of the Laravel application. The command provides two flags. The --force flag can be set to indicate that the compiled class file should be written (by default the compiled class is not written when the application is in debug mode). The --psr flag can be set to indicate that Composer should not create an optimized class map loader (class maps are generally better for performance reasons).
The compiled files cache will be written to the bootstrap/cache/compiled.php cache file. The files that are compiled and written to the cache any files that meet the following criteria:
- Any files specified in the
compile.filesconfiguration entry; - Any files that are specified by any service providers listed in the
compile.providersconfiguration entry; - Any framework files listed in the
src/Illuminate/Foundation/Console/Optimize/config.phpfile.
The following examples demonstrate how to use the optimize command:
# Generate a compiled class file with default options.
optimize
# Generate a compiled class file without optimizing the Composer
# autoload file.
optimize --psr
# Generate a compiled class file on a development or debug machine.
optimize --force
This command performs the same action as the php artisan optimize command.
Laravel Artisan Tinker: The optimize Command的更多相关文章
- laravel使用使用 Php Artisan Tinker 实现模型的增删改查
tinker命令: php artisan tinker 查阅数据库数据: App\User::count(); App\User::where('username', 'samuel')->f ...
- 使用 Php Artisan Tinker 来调试你的 Laravel
Posted on 2016年6月19日 by ichou 本文翻译自:Tinker with the Data in Your Laravel Apps with Php Artisan Tinke ...
- laravel artisan 命令工具
//全局相关 php artisan:显示详细的命令行帮助信息,同 php artisan list php artisan –help:显示帮助命令的使用格式,同 php artisan help ...
- Laravel artisan commands
使用php artisan list 可以看到artisan的所有命令以及选项. 当然你也可以在此基础上扩展自己的命令. 1. key 1.1 key:generate 这是一个加密秘钥,用于保证安全 ...
- laravel artisan 命令列表
5.4版本新增 命令 说明 备注 php artisan make:resource ? 创建api返回格式化资源 >=5.4版本可用 php artisan make:rule ? 创建val ...
- laravel5.1学习(2)-- artisan tinker命令
例如:为users表创建20条测试输入 G:\wamp\www\hcmf>php artisan tinker >>> namespace App; => null &g ...
- laravel artisan 工具心得
介绍一些非常好用的命令: 1.创建一个Eloquent模型:顺便创建一个对应的数据库表 php artisan make:model --migration Models/Admin/test 2.将 ...
- Laravel artisan 命令
获取命令列表 php artisan Laravel Framework 7.26.0 Usage: command [options] [arguments] Options: -h, --help ...
- SpringBoot Laravel(artisan serve) MIXPHP简单性能测试
测试条件: CPU: 2C 4T 2.8GHZ MEM: 8G DISK: 512GB SSD OS: OS X 10.11.6 测试指令 ab -n 2000 -c 10 测试表现 MIXPHP R ...
随机推荐
- PAT B1023 组个最小数(20)
题目描述 给定数字 0-9 各若干个.你可以以任意顺序排列这些数字,但必须全部使用.目标是使得最后得到的数尽可能小(注意 0 不能做首位).例如:给定两个 0,两个 1,三个 5,一个 8,我们得到的 ...
- 面试常考的js题目(三)
1.查找两个节点的最近的一个共同父节点,可以包括节点自身 function commonParentNode(oNode1, oNode2) { if(oNode1.contains(oNode2)) ...
- 【opencv源码解析】 二、 cvtColor
这里以CV_BGR2YUV_I420来讲 1. opencv244 core.cpp void cv::cvtColor( InputArray _src, OutputArray _dst, int ...
- JS中数组与对象的遍历方法实例小结
一.数组的遍历: 首先定义一个数组 1 arr=['snow','bran','king','nightking']; 1.for循环,需要知道数组的长度; 2.foreach,没有返回值,可以不知道 ...
- 销售订单(SO)-API-给已有的销售订单增加一行
在已存在的OM订单中增加一物料: PROCEDURE insert_new_so_api(p_return_code OUT VARCHAR2, p_return_msg OUT VARCHAR2) ...
- mysql命令行的一些小技巧【实用:多屏显示,格式化输出等】
1.以html格式输出结果使用mysql客户端的参数–html或者-T,则所有SQL的查询结果会自动生成为html的table代码$ mysql -u root --htmlWelcome to th ...
- phpstudycomposer thinkPHP5.1 使用
1.首先把php变成全局变量 2.打开phpstudy composer 的安装目录 E:\phpstudy\PHPTutorial\tools\composer 把里面的文件全部删除(或者备份一下) ...
- 如何解决Win10电脑网速慢的问题?
很多Win10系统用户反映自己的电脑配置并不算低,却比有些旧电脑上网速度还要慢,不知道是什么原因. 其实,除了运营商网速的原因外,我们的电脑设置也会对网速有所影响.下面好系统U盘启动就来介绍一个Win ...
- 如果在docker中部署tomcat,并且部署java应用程序
1.先说如何在docker中部署tomcat 第一步:root用户登录在系统根目录下创建文件夹tomcat7,命令如:mkdir tomcat7,并且切换到该目录下:cd tomcat7: 第二步:创 ...
- MySQL介绍及安装环境配置
MySQL介绍及安装环境配置 MySQL是一种关系数据库管理系统,是一种开源软件.由瑞典MySQL AB公司开发,2008年1月16号被Sun公司收购.2009年,SUN又被Oracle收购.MySQ ...