mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 22:34:03 +00:00
Fix event listener tests, improve domain logic
This commit is contained in:
parent
0bbc66f451
commit
a602cec940
13 changed files with 148 additions and 14 deletions
|
|
@ -8,8 +8,18 @@ abstract class QueueableListener implements ShouldQueue
|
|||
{
|
||||
public static $shouldQueue = false;
|
||||
|
||||
public function shouldQueue()
|
||||
abstract public function handle();
|
||||
|
||||
public function shouldQueue($event)
|
||||
{
|
||||
return static::$shouldQueue;
|
||||
if (static::$shouldQueue) {
|
||||
return true;
|
||||
} else {
|
||||
// The listener is not queued so we manually
|
||||
// pass the event to the handle() method.
|
||||
$this->handle($event);
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue