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.files configuration 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.php file.

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的更多相关文章

  1. laravel使用使用 Php Artisan Tinker 实现模型的增删改查

    tinker命令: php artisan tinker 查阅数据库数据: App\User::count(); App\User::where('username', 'samuel')->f ...

  2. 使用 Php Artisan Tinker 来调试你的 Laravel

    Posted on 2016年6月19日 by ichou 本文翻译自:Tinker with the Data in Your Laravel Apps with Php Artisan Tinke ...

  3. laravel artisan 命令工具

    //全局相关 php artisan:显示详细的命令行帮助信息,同 php artisan list php artisan –help:显示帮助命令的使用格式,同 php artisan help ...

  4. Laravel artisan commands

    使用php artisan list 可以看到artisan的所有命令以及选项. 当然你也可以在此基础上扩展自己的命令. 1. key 1.1 key:generate 这是一个加密秘钥,用于保证安全 ...

  5. laravel artisan 命令列表

    5.4版本新增 命令 说明 备注 php artisan make:resource ? 创建api返回格式化资源 >=5.4版本可用 php artisan make:rule ? 创建val ...

  6. laravel5.1学习(2)-- artisan tinker命令

    例如:为users表创建20条测试输入 G:\wamp\www\hcmf>php artisan tinker >>> namespace App; => null &g ...

  7. laravel artisan 工具心得

    介绍一些非常好用的命令: 1.创建一个Eloquent模型:顺便创建一个对应的数据库表 php artisan make:model --migration Models/Admin/test 2.将 ...

  8. Laravel artisan 命令

    获取命令列表 php artisan Laravel Framework 7.26.0 Usage: command [options] [arguments] Options: -h, --help ...

  9. 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 ...

随机推荐

  1. 洛谷P1603 斯诺登的密码(水题

    不知道什么时候打开的,随手做掉了,没什么用...大概又熟悉了一下map吧...大概........一开始还因为没读清题没把非正规的英文表示数字存进去wa了...orz最近状态不行 题目描述 题目描述 ...

  2. Elastic Search中mapping的问题

    Mapping在ES中是非常重要的一个概念.决定了一个index中的field使用什么数据格式存储,使用什么分词器解析,是否有子字段,是否需要copy to其他字段等.Mapping决定了index中 ...

  3. 18-Perl 错误处理

    1.Perl 错误处理程序运行过程中,总会碰到各式各样的错误,比如打开一个不存在的文件.程序运行过程中如果出现错误就会停止,我们就需要使用一些检测方法来避免错误,从而防止程序退出.Perl 提供了多中 ...

  4. Java Web ActiveMQ与WebService的异同

    Webservice 和MQ(MessageQueue)都是解决跨平台通信的常用手段 一.WebService:用来远程调用服务,达到打通系统.服务复用的目的.是SOA系统架构——面向服务架构的体现. ...

  5. Pytorch中nn.Dropout2d的作用

    Pytorch中nn.Dropout2d的作用 首先,关于Dropout方法,这篇博文有详细的介绍.简单来说, 我们在前向传播的时候,让某个神经元的激活值以一定的概率p停止工作,这样可以使模型泛化性更 ...

  6. [转载]flex中的正则表达式

    原文:https://blog.csdn.net/hczhiyue/article/details/20483209 (1)单字符匹配* ‘x’ 匹配字符 x.* ‘.’ 匹配任意一个字符(字节),除 ...

  7. Js-声明变量

    JS声明变量 js声明变量的方式有3种:let,const,var 1.const如果定义简单数据类型,变成常量,变量值不可以更改. const name="lili"; name ...

  8. mysql计算QPS

    首先连接上mysql: $ mysql -h .x -P3306 -uusername -p123456 进入Mysql之后,查询general_log: mysql> SHOW VARIABL ...

  9. mongodb启用auth,使用密码登录

    更新操作: db.users.update({'currentVersion':3},{$set:{'currentVersion':5}}) 首先安装下载(略过) mongod 启动服务,有多重启动 ...

  10. MySQL8.x msi版安装教程

    一.下载MySQL 官网下载地址 https://dev.mysql.com/downloads/windows/installer/8.0.html  下载第二个即可(虽然只有32位的 但是会同时安 ...