名称 最后更新
..
Capsule 正在载入提交数据...
Connectors 正在载入提交数据...
Console 正在载入提交数据...
Events 正在载入提交数据...
Failed 正在载入提交数据...
Jobs 正在载入提交数据...
Middleware 正在载入提交数据...
BeanstalkdQueue.php 正在载入提交数据...
CallQueuedClosure.php 正在载入提交数据...
CallQueuedHandler.php 正在载入提交数据...
DatabaseQueue.php 正在载入提交数据...
InteractsWithQueue.php 正在载入提交数据...
InvalidPayloadException.php 正在载入提交数据...
LICENSE.md 正在载入提交数据...
Listener.php 正在载入提交数据...
ListenerOptions.php 正在载入提交数据...
LuaScripts.php 正在载入提交数据...
ManuallyFailedException.php 正在载入提交数据...
MaxAttemptsExceededException.php 正在载入提交数据...
NullQueue.php 正在载入提交数据...
Queue.php 正在载入提交数据...
QueueManager.php 正在载入提交数据...
QueueServiceProvider.php 正在载入提交数据...
README.md 正在载入提交数据...
RedisQueue.php 正在载入提交数据...
SerializableClosure.php 正在载入提交数据...
SerializableClosureFactory.php 正在载入提交数据...
SerializesAndRestoresModelIdentifiers.php 正在载入提交数据...
SerializesModels.php 正在载入提交数据...
SqsQueue.php 正在载入提交数据...
SyncQueue.php 正在载入提交数据...
Worker.php 正在载入提交数据...
WorkerOptions.php 正在载入提交数据...
composer.json 正在载入提交数据...

Illuminate Queue

The Laravel Queue component provides a unified API across a variety of different queue services. Queues allow you to defer the processing of a time consuming task, such as sending an e-mail, until a later time, thus drastically speeding up the web requests to your application.

Usage Instructions

First, create a new Queue Capsule manager instance. Similar to the "Capsule" provided for the Eloquent ORM, the queue Capsule aims to make configuring the library for usage outside of the Laravel framework as easy as possible.

use Illuminate\Queue\Capsule\Manager as Queue;

$queue = new Queue;

$queue->addConnection([
    'driver' => 'beanstalkd',
    'host' => 'localhost',
    'queue' => 'default',
]);

// Make this Capsule instance available globally via static methods... (optional)
$queue->setAsGlobal();

Once the Capsule instance has been registered. You may use it like so:

// As an instance...
$queue->push('SendEmail', ['message' => $message]);

// If setAsGlobal has been called...
Queue::push('SendEmail', ['message' => $message]);

For further documentation on using the queue, consult the Laravel framework documentation.