diff --git a/app/Http/routes.php b/app/Http/routes.php index 5cb9cc9a..9198ca7e 100644 --- a/app/Http/routes.php +++ b/app/Http/routes.php @@ -762,8 +762,6 @@ Route::group( // return 'TODO: add terms and cond'; // } // ]); - Route::get('helpTicket/{id}/replay', 'HelpTicketCrudController@replay')->name('ticket.replay'); - Route::post('helpTicket/{id}/replay', 'HelpTicketCrudController@replayPost')->name('ticket.replay.post'); /** CATCH-ALL ROUTE for Backpack/PageManager - needs to be at the end of your routes.php file **/ Route::get('{page}/{subs?}', ['uses' => '\App\Http\Controllers\PageController@index','as'=>'about']) ->where(['page' => '^(((?=(?!admin))(?=(?!\/)).))*$', 'subs' => '.*']); diff --git a/app/Notifications/TicketReceived.php b/app/Notifications/TicketReceived.php index 31cfe3e0..138da2bb 100644 --- a/app/Notifications/TicketReceived.php +++ b/app/Notifications/TicketReceived.php @@ -52,19 +52,25 @@ class TicketReceived extends Notification implements ShouldQueue */ public function toMail($notifiable) { - if($notifiable instanceof HelpTicket){ - return (new MailMessage) - ->line('The introduction to the notification.') -// ->action('Notification Action', route('help.show',['code' => $this->ticket->code])) - ->line('Thank you for using our application!'); - } - else - return (new MailMessage) + try{ + if($notifiable instanceof HelpTicket){ + return (new MailMessage) + ->line('The introduction to the notification.') + ->action('Notification Action', route('help.show',['code' => $this->ticket->code])) + ->line('Thank you for using our application!'); + } + else + return (new MailMessage) ->line('You have new ticket') -// ->action('Notification Action', route('ticket.replay',['id'=>$this->ticket->id])) + ->action('Notification Action', route('ticket.replay',['id'=>$this->ticket->id])) ->line('Thank you for using our application!'); - Log::info('Mail Notification: ',$notifiable); + Log::info('Mail Notification: ',$notifiable); + } + catch (\Exception $ex){ + Log::error($ex); + } + } /**