Skip to content

Instantly share code, notes, and snippets.

@cursosdesarrolloweb
Created July 22, 2021 18:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cursosdesarrolloweb/94ffbf1275c257f2144d3f06818875f5 to your computer and use it in GitHub Desktop.
Save cursosdesarrolloweb/94ffbf1275c257f2144d3f06818875f5 to your computer and use it in GitHub Desktop.
<?php
namespace App\Listeners;
use App\Events\NewOrder;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Queue\InteractsWithQueue;
class NotifyOrderToAdmin implements ShouldQueue
{
/**
* The name of the connection the job should be sent to.
*
* @var string|null
*/
public string $connection = 'database';
/**
* The name of the queue the job should be sent to.
*
* @var string|null
*/
public string $queue = 'listeners';
/**
* Create the event listener.
*
* @return void
*/
public function __construct()
{
//
}
/**
* Handle the event.
*
* @param NewOrder $event
* @return void
*/
public function handle(NewOrder $event)
{
\Log::info(self::class);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment