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. 题解 洛谷P1311 【选择客栈】

    可能这做法是最奇葩的ST表 我们枚举k,计算每种色调的客栈各有多少种方法  我们利用一种奇怪的思想:除了不可行的,剩下的都是可行的 所以我们先求出 每种颜色的客栈随机选择两个,一共有多少种结果 接着减 ...

  2. table表格整体居中 和 table表格中各行各列内容居中

    1.table表格整个居中<div style="text-align: center;"> <table border="1" style= ...

  3. redis 命令 setbit、bitcount、getbit、bitop

    1.SETBIT key offset value 对 key 所储存的字符串值,设置或清除指定偏移量上的位(bit). 在redis中,存储的字符串都是以二级制的进行存在的. 举例: 设置一个 ke ...

  4. QT目录模型QDirModel的使用(一个model同时连接tree,list,table)

    3#include <QApplication>#include <QAbstractItemModel>#include <QAbstractItemView># ...

  5. GNU g++常用编译选项用法

    GNU g++常用编译选项用法 本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/30686/showart_1210761.html GCC ...

  6. 数组去重-----js 判断字符串中是否包含某个字符串indexOf

    判断obj对象是否在arr数组里面,是返回true const dealArray = (arr, obj) => { Array.prototype.S = String.fromCharCo ...

  7. git统计某个时间段写的代码行数

    1. 任务需要 领导想每个迭代统计一下,当前迭代开发的代码数量是多少 2. 解决方法 git log --stat --since=2019-09-12 --until=2019-09-27 | pe ...

  8. Scrapy - 第一个爬虫和我的博客

    第一个爬虫 这里我用官方文档的第一个例子:爬取http://quotes.toscrape.com来作为我的首个scrapy爬虫,我没有找到scrapy 1.5的中文文档,后续内容有部分是我按照官方文 ...

  9. 记录--js中出现的数组排序问题

    这是今天在写vue项目时发生的一个小问题,在此记录一下,方便自己的回顾.项目是前后端分离的,前台主要使用了vue-cli3.0 + mintui,是一个移动端的web app包括了后台发布管理的一些功 ...

  10. Oracle笔记(七) 数据更新、事务处理、数据伪列

    一.数据的更新操作 DML操作语法之中,除了查询之外还有数据的库的更新操作,数据的更新操作主要指的是:增加.修改.删除数据,但是考虑到emp表以后还要继续使用,所以下面先将emp表复制一份,输入如下指 ...