listener-queued-duck.stub
TLDR
This file is a stub file for a listener class that is intended to be queued. It contains a class with two methods: a constructor and a handle
method to handle an event.
Classes
{{ class }}
This class is the main class in the file and represents a listener. It implements the ShouldQueue
interface, indicating that it should be queued for execution. The class also uses the InteractsWithQueue
trait.
The class has the following methods:
__construct
This method is the constructor for the class. It doesn't have any parameters and doesn't perform any specific actions.
handle
This method is responsible for handling an event. It accepts an object of type object
as a parameter, representing the event to be handled. The method doesn't return any value.
<?php
namespace {{ namespace }};
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Queue\InteractsWithQueue;
class {{ class }} implements ShouldQueue
{
use InteractsWithQueue;
/**
* Create the event listener.
*/
public function __construct()
{
//
}
/**
* Handle the event.
*/
public function handle(object $event): void
{
//
}
}