nojacko / laravel-tools
Jacko的Laravel工具。
这个包的规范仓库似乎已经消失,因此该包已被冻结。
dev-master
2016-11-12 16:18 UTC
Requires
- php: >=5.5.9
- laravel/framework: 5.*
- league/climate: ^3.2
Requires (Dev)
- fzaninotto/faker: ~1.4
- mockery/mockery: 0.9.*
- phpunit/phpunit: ~4.0
- symfony/css-selector: 2.8.*|3.0.*
- symfony/dom-crawler: 2.8.*|3.0.*
This package is not auto-updated.
Last update: 2021-01-22 23:05:15 UTC
README
我在Laravel中使用的一些东西。
数据库
优化器
在所有MySQL连接中的所有表上运行 OPTIMIZE TABLE
。
# Kernel.php
protected $commands = [
\JackosLaravelTools\Console\Commands\DatabaseOptimize::class,
];
# Command
php artisan database:optimize
等待
在退出前反复尝试查询您的数据库,持续时间为 --wait
秒。
# Kernel.php
protected $commands = [
\JackosLaravelTools\Console\Commands\DatabaseWait::class,
];
# Command
php artisan database:wait {--wait=10}
基础控制台类
是 Illuminate\Console\Command
的扩展,包含有用的函数和实例。
use JackosLaravelTools\Console\Commands\Base;
namespace JackosLaravelTools\Console\Commands;
class DatabaseWait extends Base
{
// Instance of `\League\CLImate\CLImate`
protected $cli;
// Prints "$this->name: $this->description".
public function printIntro();
// Prints "$this->name: $message".
public function printLog($message = '');
// Prints "$this->name: DONE".
public function printOuttro();
}