improved tenant identification
This commit is contained in:
36
app/Jobs/Auth/NotifyUser.php
Normal file
36
app/Jobs/Auth/NotifyUser.php
Normal file
@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
namespace App\Jobs\Auth;
|
||||
|
||||
use App\Abstracts\JobShouldQueue;
|
||||
|
||||
class NotifyUser extends JobShouldQueue
|
||||
{
|
||||
protected $user;
|
||||
|
||||
protected $notification;
|
||||
|
||||
/**
|
||||
* Create a new job instance.
|
||||
*
|
||||
* @param $user
|
||||
* @param $notification
|
||||
*/
|
||||
public function __construct($user, $notification)
|
||||
{
|
||||
$this->user = $user;
|
||||
$this->notification = $notification;
|
||||
|
||||
$this->onQueue('jobs');
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute the job.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
$this->user->notify($this->notification);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user