aveley/artisan-queue

此包已被废弃,不再维护。未建议替代包。

将 artisan 命令排队以便稍后执行

1.0 2014-04-25 22:16 UTC

This package is not auto-updated.

Last update: 2017-11-29 10:11:07 UTC


README

添加方法以将 artisan 命令放入队列。

用法

Queue::artisan(command, optional array arguments)

例如

// equivalent to php artisan migrate:refresh
Queue::artisan('migrate:refresh') // for whatever reason you want to queue this command

// equivalent for php artisan your-own-command:task parameter=value --optional=optionalValue
Queue::artisan('your-own-command:task', array('parameter' => 'value', '--optional' => 'optionalValue'))

安装

添加到 composer

"aveley/artisan-queue": "dev-master"

更新你的 composer

composer update

在 app/config/app.php -> aliases 中更改此行

'Queue'           => 'Illuminate\Support\Facades\Queue',

'Queue'           => 'Aveley\Artisanqueue\Queue',