Import notification file and updated other file..
This commit is contained in:
@ -11,11 +11,18 @@ class ImportCompleted extends Notification implements ShouldQueue
|
||||
{
|
||||
use Queueable;
|
||||
|
||||
protected $translation;
|
||||
|
||||
protected $total_rows;
|
||||
|
||||
/**
|
||||
* Create a notification instance.
|
||||
*/
|
||||
public function __construct()
|
||||
public function __construct($translation, $total_rows)
|
||||
{
|
||||
$this->translation = $translation;
|
||||
$this->total_rows = $total_rows;
|
||||
|
||||
$this->onQueue('notifications');
|
||||
}
|
||||
|
||||
@ -27,7 +34,7 @@ class ImportCompleted extends Notification implements ShouldQueue
|
||||
*/
|
||||
public function via($notifiable)
|
||||
{
|
||||
return ['mail'];
|
||||
return ['mail', 'database'];
|
||||
}
|
||||
|
||||
/**
|
||||
@ -45,4 +52,18 @@ class ImportCompleted extends Notification implements ShouldQueue
|
||||
->line(trans('notifications.import.completed.description'))
|
||||
->action(trans_choice('general.dashboards', 1), $dashboard_url);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the array representation of the notification.
|
||||
*
|
||||
* @param mixed $notifiable
|
||||
* @return array
|
||||
*/
|
||||
public function toArray($notifiable)
|
||||
{
|
||||
return [
|
||||
'translation' => $this->translation,
|
||||
'total_rows' => $this->total_rows,
|
||||
];
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user