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.files
configuration entry; - Any files that are specified by any service providers listed in the
compile.providers
configuration 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的更多相关文章
- 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 ...
随机推荐
- selenium的使用与chromedriver的下载配置
Selenium是一个web自动化测试工具,最初是为网站自动化测试而开发的,Selenium可以直接运行在浏览器上,它支持所有主流的浏览器,可以接受指令,让浏览器自动加载页面,获得需要的数据,甚至页面 ...
- xml 表格
设置单元格样式 <Style ss:ID="唯一id字符" ss:Name="单元格样式"> [内部通常用来设置 Alignment对齐.Font字 ...
- MySQL各大存储引擎
MySQL各大存储引擎: 最好先看下你下的MySQL支持什么数据库引擎 存储引擎主要有: 1. MyIsam , 2. InnoDB, 3. Memory, 4. Blackhole, 5. CSV, ...
- Ruby Rails学习中:添加安全密码
接上篇 一. 添加安全密码 我们已经为 name 和 email 字段添加了验证规则, 现在要加入用户所需的最后一个常规属性: 安全密码.每个用户都要设置一个密码(还要二次确认), 数据库中则存储经过 ...
- Linux命令-文件管理篇-cat
1.cat 说明 cat 是一个文本文件查看和连接工具.查看一个文件的内容,用cat比较简单,就是cat 后面直接接文件名. 2.使用权限 所有使用者 <!-- more --> 3.ca ...
- 16-Perl 文件操作
1.Perl 文件操作Perl 使用一种叫做文件句柄类型的变量来操作文件.从文件读取或者写入数据到文件需要使用文件句柄.文件句柄(file handle)是一个I/O连接的名称.Perl提供了三种文件 ...
- sequelize学习笔记
示例: const Sequelize = require('sequelize'); // 建立连接 const sequelize = new Sequelize('test', 'root', ...
- LeetCode 腾讯精选50题--数组中的第K个最大元素
好吧,不得不承认,书上看到的始终不是自己的,只有亲身时间过才会明白该怎么操作. 找数组中第K个最大元素,简而言之就是先排序,不论使用哪种算法,都需要先排序,确认位置,由于数组可以通过下标直接访问,所以 ...
- vue打开到新页面,并传递参数
打开新页面,有两种方式, 一种是标签式: <router-link tag="a" target="_blank" :to="{path: '/ ...
- 自定义事件 Event 、CustomEvent的使用
通过Event和dispathEvents触发自定义事件 <span id="btn">获取</span> <script> var event ...