@@ -2,6 +2,7 @@ | |||
namespace App\Http\Controllers; | |||
use App\Model\Subscriber; | |||
use Illuminate\Foundation\Bus\DispatchesJobs; | |||
use Illuminate\Routing\Controller as BaseController; | |||
use Illuminate\Foundation\Validation\ValidatesRequests; | |||
@@ -10,4 +11,20 @@ use Illuminate\Foundation\Auth\Access\AuthorizesRequests; | |||
class Controller extends BaseController | |||
{ | |||
use AuthorizesRequests, DispatchesJobs, ValidatesRequests; | |||
public function updateCity() | |||
{ | |||
$subscribers = Subscriber::all(); | |||
foreach ($subscribers as $key => $a) { | |||
$a->unit_no = strtoupper($a->unit_no); | |||
$a->building_name = strtoupper($a->building_name); | |||
$a->street = strtoupper($a->street); | |||
$a->city = strtoupper($a->city); | |||
$a->state = strtoupper($a->state); | |||
$a->save(); | |||
} | |||
return "Done standardize city in DB"; | |||
} | |||
} |
@@ -3946,7 +3946,7 @@ class MarketingController extends Controller | |||
$pdfName = preg_replace('/\s+/', '-', $com->name) . '-' . $app . '-' . $month . '-' . $year . '.pdf'; | |||
} | |||
return $pdf->stream($pdfName); | |||
return $pdf->download($pdfName); | |||
} | |||
} | |||
@@ -94,7 +94,7 @@ class AssignWorkOrder extends Mailable | |||
$pdf = PDF::loadView('pdf.workorder-pdf',compact('wo','form','product','created_at','created_by','address', 'category')); | |||
$pdf->setPaper('A4', 'potrait'); | |||
return $this->from('no-reply@citybroadband.my','no-reply@citybroadband.my')->subject('You Have New Work Order')->view('email.assign_wo') | |||
return $this->from('no-reply@allo.my','no-reply@allo.my')->subject('You Have New Work Order')->view('email.assign_wo') | |||
->attachData($pdf->output(), $wo->wo.'.pdf', ['mime' => 'application/pdf',]); | |||
} | |||
} |
@@ -35,6 +35,6 @@ class CustomerBInvoice extends Mailable | |||
*/ | |||
public function build() | |||
{ | |||
return $this->from('no-reply@citybroadband.my','no-reply@citybroadband.my')->subject('Verify your City Broadband (CBB) Subscription')->view('email.invoiceb'); | |||
return $this->from('no-reply@allo.my','no-reply@allo.my')->subject('Verify your City Broadband (CBB) Subscription')->view('email.invoiceb'); | |||
} | |||
} |
@@ -35,6 +35,6 @@ class CustomerInvoice extends Mailable | |||
*/ | |||
public function build() | |||
{ | |||
return $this->from('no-reply@citybroadband.my','no-reply@citybroadband.my')->subject('Verify your City Broadband (CBB) Subscription')->view('email.invoice'); | |||
return $this->from('no-reply@allo.my','no-reply@allo.my')->subject('Verify your City Broadband (CBB) Subscription')->view('email.invoice'); | |||
} | |||
} |
@@ -81,6 +81,8 @@ | |||
<option value="Maxis"<?php if($form->customer_category == "Maxis") { echo "selected"; } ?>>Maxis</option> | |||
<option value="Digi"<?php if($form->customer_category == "Digi") { echo "selected"; } ?>>Digi</option> | |||
<option value="Celcom"<?php if($form->customer_category == "Celcom") { echo "selected"; } ?>>Celcom</option> | |||
<option value="TIME"<?php if($form->customer_category == "TIME") { echo "selected"; } ?>>TIME</option> | |||
<option value="TM"<?php if($form->customer_category == "TM") { echo "selected"; } ?>>TM</option> | |||
</select> | |||
</div> | |||
<div class="grid2"> </div> |
@@ -85,6 +85,8 @@ | |||
<option value="Maxis"<?php if($form->customer_category == "Maxis") { echo "selected"; } ?>>Maxis</option> | |||
<option value="Digi"<?php if($form->customer_category == "Digi") { echo "selected"; } ?>>Digi</option> | |||
<option value="Celcom"<?php if($form->customer_category == "Celcom") { echo "selected"; } ?>>Celcom</option> | |||
<option value="TIME"<?php if($form->customer_category == "TIME") { echo "selected"; } ?>>TIME</option> | |||
<option value="TM"<?php if($form->customer_category == "TM") { echo "selected"; } ?>>TM</option> | |||
</select> | |||
</div> | |||
<div class="grid2"> </div> |
@@ -183,6 +183,8 @@ | |||
<option value="Maxis">Maxis</option> | |||
<option value="Digi">Digi</option> | |||
<option value="Celcom">Celcom</option> | |||
<option value="TIME">TIME</option> | |||
<option value="TM">TM</option> | |||
</select> | |||
</div> | |||
<div class="grid2"> </div> |
@@ -189,6 +189,8 @@ | |||
<option value="Maxis">Maxis</option> | |||
<option value="Digi">Digi</option> | |||
<option value="Celcom">Celcom</option> | |||
<option value="TIME">TIME</option> | |||
<option value="TM">TM</option> | |||
</select> | |||
</div> | |||
<div class="grid2"> </div> | |||
@@ -240,6 +242,8 @@ | |||
<option value="Maxis">Maxis</option> | |||
<option value="Digi">Digi</option> | |||
<option value="Celcom">Celcom</option> | |||
<option value="TIME">TIME</option> | |||
<option value="TM">TM</option> | |||
</select> | |||
</div> | |||
<div class="grid2"> </div> | |||
@@ -651,6 +655,8 @@ | |||
<option value="Maxis">Maxis</option> | |||
<option value="Digi">Digi</option> | |||
<option value="Celcom">Celcom</option> | |||
<option value="TIME">TIME</option> | |||
<option value="TM">TM</option> | |||
</select> | |||
</div> | |||
<div class="grid2"> </div> |
@@ -14,6 +14,8 @@ Route::get('/', function () { | |||
return view('index'); | |||
}); | |||
Route::get('/update-city', 'Controller@updateCity'); | |||
Route::get('/convert-password/{action}/', ['uses' => 'Auth\AdminController@encryptPassword']); | |||
Route::get('/store-claim/pdf', ['uses' => 'DS\DealerController@exportDealerJson']); | |||
Route::get('/convert-total-claim-float', ['uses' => 'DS\DealerController@update_total_claim']); |