From cf46a2cf42960025e8c262f6e4eedeada5facc52 Mon Sep 17 00:00:00 2001 From: Deon George Date: Thu, 23 Aug 2018 16:31:46 +1000 Subject: [PATCH] Added subject to email --- app/Http/Controllers/AdminHomeController.php | 2 +- app/Mail/OrderRequestApprove.php | 13 +++++++++++++ composer.lock | 6 +++--- 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/app/Http/Controllers/AdminHomeController.php b/app/Http/Controllers/AdminHomeController.php index 8ddc671..ad98365 100644 --- a/app/Http/Controllers/AdminHomeController.php +++ b/app/Http/Controllers/AdminHomeController.php @@ -39,7 +39,7 @@ class AdminHomeController extends Controller return $this->service($o); } - return redirect(url('/a/service/',[$o->id])); + return redirect(url('/a/service',[$o->id])); } public function setup() diff --git a/app/Mail/OrderRequestApprove.php b/app/Mail/OrderRequestApprove.php index 64818a4..a291319 100644 --- a/app/Mail/OrderRequestApprove.php +++ b/app/Mail/OrderRequestApprove.php @@ -35,8 +35,21 @@ class OrderRequestApprove extends Mailable */ public function build() { + switch ($this->service->category) + { + case 'ADSL': $subject = sprintf('%s: %s',$this->service->category,$this->service->service_adsl->service_address); + break; + + case 'VOIP': $subject = sprintf('%s: %s',$this->service->category,$this->service->service_voip->service_number); + break; + + default: + $subject = 'New Order Request'; + } + return $this ->markdown('email.admin.order.approve') + ->subject($subject) ->with(['site'=>config('SITE_SETUP')]); } } \ No newline at end of file diff --git a/composer.lock b/composer.lock index d3e8568..be34b21 100644 --- a/composer.lock +++ b/composer.lock @@ -2463,11 +2463,11 @@ }, { "name": "leenooks/laravel", - "version": "0.2.2", + "version": "0.2.3", "source": { "type": "git", "url": "https://dev.leenooks.net/leenooks/laravel", - "reference": "3af5ae6466776aaae574dc184498e29e74e02c77" + "reference": "8aa21663d54567e756c841ad1f6b81a2b586db94" }, "require": { "igaster/laravel-theme": "2.0.6", @@ -2503,7 +2503,7 @@ "laravel", "leenooks" ], - "time": "2018-08-12T07:01:50+00:00" + "time": "2018-08-23T06:26:39+00:00" }, { "name": "maximebf/debugbar",