Update v1.0.6.10
This commit is contained in:
@@ -3,17 +3,16 @@
|
|||||||
namespace App\Http\Controllers\Agent\helpdesk;
|
namespace App\Http\Controllers\Agent\helpdesk;
|
||||||
|
|
||||||
// controllers
|
// controllers
|
||||||
use App\Http\Controllers\Common\PhpMailController;
|
|
||||||
// Model
|
|
||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
|
// Model
|
||||||
use App\Model\helpdesk\Agent\Department;
|
use App\Model\helpdesk\Agent\Department;
|
||||||
use App\Model\helpdesk\Agent\Teams;
|
use App\Model\helpdesk\Agent\Teams;
|
||||||
use App\Model\helpdesk\Settings\Company;
|
use App\Model\helpdesk\Settings\Company;
|
||||||
use App\Model\helpdesk\settings\Email;
|
use App\Model\helpdesk\Settings\Email;
|
||||||
use App\Model\helpdesk\Utility\Log_notification;
|
use App\Model\helpdesk\Utility\Log_notification;
|
||||||
use App\User;
|
use App\User;
|
||||||
use View;
|
use View;
|
||||||
|
use App\Http\Controllers\Common\PhpMailController;
|
||||||
// classes
|
// classes
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -24,9 +23,8 @@ use View;
|
|||||||
*/
|
*/
|
||||||
class NotificationController extends Controller
|
class NotificationController extends Controller
|
||||||
{
|
{
|
||||||
public function __construct(PhpMailController $PhpMailController)
|
public function __construct(PhpMailController $PhpMailController) {
|
||||||
{
|
$this->PhpMailController = $PhpMailController;
|
||||||
$this->PhpMailController = $PhpMailController;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -75,7 +73,7 @@ class NotificationController extends Controller
|
|||||||
$user_name = $user->first_name.' '.$user->last_name;
|
$user_name = $user->first_name.' '.$user->last_name;
|
||||||
$view = View::make('emails.notifications.admin', ['company' => $company, 'name' => $user_name]);
|
$view = View::make('emails.notifications.admin', ['company' => $company, 'name' => $user_name]);
|
||||||
$contents = $view->render();
|
$contents = $view->render();
|
||||||
$this->PhpMailController->sendEmail($from = $this->PhpMailController->mailfrom('1', '0'), $to = ['name' => $user_name, 'email' => $email], $message = ['subject' => 'Dily Report', 'scenario' => null, 'body' => $contents]);
|
$this->PhpMailController->sendEmail($from = $this->PhpMailController->mailfrom('1', '0'), $to = ['name' => $user_name, 'email' => $email], $message = ['subject' => 'Dily Report', 'scenario' => null,'body' => $contents]);
|
||||||
|
|
||||||
// \Mail::send('emails.notifications.admin', ['company' => $company, 'name' => $user_name], function ($message) use ($email, $user_name, $company) {
|
// \Mail::send('emails.notifications.admin', ['company' => $company, 'name' => $user_name], function ($message) use ($email, $user_name, $company) {
|
||||||
// $message->to($email, $user_name)->subject($company.' Daily Report ');
|
// $message->to($email, $user_name)->subject($company.' Daily Report ');
|
||||||
@@ -101,8 +99,8 @@ class NotificationController extends Controller
|
|||||||
$email = $user->email;
|
$email = $user->email;
|
||||||
$user_name = $user->first_name.' '.$user->last_name;
|
$user_name = $user->first_name.' '.$user->last_name;
|
||||||
$view = View::make('emails.notifications.manager', ['company' => $company, 'name' => $user_name]);
|
$view = View::make('emails.notifications.manager', ['company' => $company, 'name' => $user_name]);
|
||||||
$contents = $view->render();
|
$contents = $view->render();
|
||||||
$this->PhpMailController->sendEmail($from = $this->PhpMailController->mailfrom('1', '0'), $to = ['name' => $user_name, 'email' => $email], $message = ['subject' => 'Dily Report', 'scenario' => null, 'body' => $contents]);
|
$this->PhpMailController->sendEmail($from = $this->PhpMailController->mailfrom('1', '0'), $to = ['name' => $user_name, 'email' => $email], $message = ['subject' => 'Dily Report', 'scenario' => null,'body' => $contents]);
|
||||||
|
|
||||||
// \Mail::send('emails.notifications.manager', ['company' => $company, 'name' => $user_name, 'dept_id' => $dept->id, 'dept_name' => $dept->name], function ($message) use ($email, $user_name, $company, $dept_name) {
|
// \Mail::send('emails.notifications.manager', ['company' => $company, 'name' => $user_name, 'dept_id' => $dept->id, 'dept_name' => $dept->name], function ($message) use ($email, $user_name, $company, $dept_name) {
|
||||||
// $message->to($email, $user_name)->subject($company.' Daily Report for department manager of '.$dept_name.' department.');
|
// $message->to($email, $user_name)->subject($company.' Daily Report for department manager of '.$dept_name.' department.');
|
||||||
@@ -131,7 +129,7 @@ class NotificationController extends Controller
|
|||||||
$user_name = $user->first_name.' '.$user->last_name;
|
$user_name = $user->first_name.' '.$user->last_name;
|
||||||
$view = View::make('emails.notifications.lead', ['company' => $company, 'name' => $user_name]);
|
$view = View::make('emails.notifications.lead', ['company' => $company, 'name' => $user_name]);
|
||||||
$contents = $view->render();
|
$contents = $view->render();
|
||||||
$this->PhpMailController->sendEmail($from = $this->PhpMailController->mailfrom('1', '0'), $to = ['name' => $user_name, 'email' => $email], $message = ['subject' => 'Dily Report', 'scenario' => null, 'body' => $contents]);
|
$this->PhpMailController->sendEmail($from = $this->PhpMailController->mailfrom('1', '0'), $to = ['name' => $user_name, 'email' => $email], $message = ['subject' => 'Dily Report', 'scenario' => null,'body' => $contents]);
|
||||||
|
|
||||||
// \Mail::send('emails.notifications.lead', ['company' => $company, 'name' => $user_name, 'team_id' => $team->id], function ($message) use ($email, $user_name, $company, $team_name) {
|
// \Mail::send('emails.notifications.lead', ['company' => $company, 'name' => $user_name, 'team_id' => $team->id], function ($message) use ($email, $user_name, $company, $team_name) {
|
||||||
// $message->to($email, $user_name)->subject($company.' Daily Report for Team Lead of team '.$team_name);
|
// $message->to($email, $user_name)->subject($company.' Daily Report for Team Lead of team '.$team_name);
|
||||||
@@ -154,9 +152,9 @@ class NotificationController extends Controller
|
|||||||
// Send notification details to all the agents
|
// Send notification details to all the agents
|
||||||
$email = $user->email;
|
$email = $user->email;
|
||||||
$user_name = $user->first_name.' '.$user->last_name;
|
$user_name = $user->first_name.' '.$user->last_name;
|
||||||
$view = View::make('emails.notifications.agent', ['company' => $company, 'name' => $user_name]);
|
$view = View::make('emails.notifications.agent', ['company' => $company, 'name' => $user_name, 'user_id' => $user->id]);
|
||||||
$contents = $view->render();
|
$contents = $view->render();
|
||||||
$this->PhpMailController->sendEmail($from = $this->PhpMailController->mailfrom('1', '0'), $to = ['name' => $user_name, 'email' => $email], $message = ['subject' => 'Dily Report', 'scenario' => null, 'body' => $contents]);
|
$this->PhpMailController->sendEmail($from = $this->PhpMailController->mailfrom('1', '0'), $to = ['name' => $user_name, 'email' => $email], $message = ['subject' => 'Dily Report', 'scenario' => null,'body' => $contents]);
|
||||||
|
|
||||||
// \Mail::send('emails.notifications.agent', ['company' => $company, 'name' => $user_name, 'user_id' => 1], function ($message) use ($email, $user_name, $company) {
|
// \Mail::send('emails.notifications.agent', ['company' => $company, 'name' => $user_name, 'user_id' => 1], function ($message) use ($email, $user_name, $company) {
|
||||||
// $message->to($email, $user_name)->subject($company.' Daily Report for Agents');
|
// $message->to($email, $user_name)->subject($company.' Daily Report for Agents');
|
||||||
|
Reference in New Issue
Block a user