Skip to content

Instantly share code, notes, and snippets.

@alouini333
Created January 19, 2020 16:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save alouini333/d2c348f3eeaaf4eec97c50206c420bd5 to your computer and use it in GitHub Desktop.
Save alouini333/d2c348f3eeaaf4eec97c50206c420bd5 to your computer and use it in GitHub Desktop.
<?php
namespace App\Notifications;
use Illuminate\Bus\Queueable;
use Illuminate\Notifications\Notification;
class BaseNotification extends Notification
{
use Queueable;
protected $tenant;
/**
* Create a new notification instance.
*
* @return void
*/
public function __construct($tenant)
{
$this->tenant = $tenant;
}
public function getTenant()
{
return $this->tenant;
}
public function via()
{
return ['database'];
}
public function toArray($notifiable)
{
return [
'name' => $notifiable->name,
'email' => $notifiable->email
];
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment