New notification page..
This commit is contained in:
@ -11,6 +11,10 @@ class ExportCompleted extends Notification implements ShouldQueue
|
||||
{
|
||||
use Queueable;
|
||||
|
||||
protected $translation;
|
||||
|
||||
protected $file_name;
|
||||
|
||||
protected $download_url;
|
||||
|
||||
/**
|
||||
@ -18,8 +22,10 @@ class ExportCompleted extends Notification implements ShouldQueue
|
||||
*
|
||||
* @param string $download_url
|
||||
*/
|
||||
public function __construct($download_url)
|
||||
public function __construct($translation, $file_name, $download_url)
|
||||
{
|
||||
$this->translation = $translation;
|
||||
$this->file_name = $file_name;
|
||||
$this->download_url = $download_url;
|
||||
|
||||
$this->onQueue('notifications');
|
||||
@ -33,7 +39,7 @@ class ExportCompleted extends Notification implements ShouldQueue
|
||||
*/
|
||||
public function via($notifiable)
|
||||
{
|
||||
return ['mail'];
|
||||
return ['mail', 'database'];
|
||||
}
|
||||
|
||||
/**
|
||||
@ -49,4 +55,19 @@ class ExportCompleted extends Notification implements ShouldQueue
|
||||
->line(trans('notifications.export.completed.description'))
|
||||
->action(trans('general.download'), $this->download_url);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the array representation of the notification.
|
||||
*
|
||||
* @param mixed $notifiable
|
||||
* @return array
|
||||
*/
|
||||
public function toArray($notifiable)
|
||||
{
|
||||
return [
|
||||
'translation' => $this->translation,
|
||||
'file_name' => $this->file_name,
|
||||
'download_url' => $this->download_url,
|
||||
];
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user