help desk notification ticketCommented

This commit is contained in:
merdan 2020-05-06 22:19:57 +05:00
parent 402c54d3f7
commit 1cfa46f4dd
2 changed files with 16 additions and 12 deletions

View File

@ -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' => '.*']);

View File

@ -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);
}
}
/**