Fix Model Policies from matching user_id's and account_id's, and other minor cosmetic fixes
This commit is contained in:
@@ -3,9 +3,9 @@
|
||||
namespace App\Mail;
|
||||
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use Illuminate\Mail\Mailable;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
|
||||
use App\Models\Invoice;
|
||||
|
||||
|
@@ -13,8 +13,8 @@ class OrderRequestApprove extends Mailable
|
||||
{
|
||||
use Queueable, SerializesModels;
|
||||
|
||||
public $service;
|
||||
public $notes;
|
||||
public Service $service;
|
||||
public string $notes;
|
||||
|
||||
/**
|
||||
* Create a new message instance.
|
||||
@@ -22,7 +22,7 @@ class OrderRequestApprove extends Mailable
|
||||
* @param Service $o
|
||||
* @param string $notes
|
||||
*/
|
||||
public function __construct(Service $o,$notes='')
|
||||
public function __construct(Service $o,string $notes='')
|
||||
{
|
||||
$this->service = $o;
|
||||
$this->notes = $notes;
|
||||
@@ -35,8 +35,7 @@ class OrderRequestApprove extends Mailable
|
||||
*/
|
||||
public function build()
|
||||
{
|
||||
switch ($this->service->category)
|
||||
{
|
||||
switch ($this->service->category) {
|
||||
case 'ADSL': $subject = sprintf('%s: %s',$this->service->category,$this->service->service_adsl->service_address);
|
||||
break;
|
||||
|
||||
|
@@ -13,15 +13,15 @@ class OrderRequestReject extends Mailable
|
||||
{
|
||||
use Queueable, SerializesModels;
|
||||
|
||||
public $service;
|
||||
public $reason;
|
||||
public Service $service;
|
||||
public string $reason;
|
||||
|
||||
/**
|
||||
* Create a new message instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(Service $o,$reason)
|
||||
public function __construct(Service $o,string $reason)
|
||||
{
|
||||
$this->service = $o;
|
||||
$this->reason = $reason;
|
||||
|
@@ -12,14 +12,13 @@ class SocialLink extends Mailable
|
||||
{
|
||||
use Queueable, SerializesModels;
|
||||
|
||||
public $token;
|
||||
public $user;
|
||||
public string $token;
|
||||
public User $user;
|
||||
|
||||
/**
|
||||
* Create a new message instance.
|
||||
*
|
||||
* @param User $o
|
||||
* @param string $token
|
||||
* @param AccountOauth $o
|
||||
*/
|
||||
public function __construct(AccountOauth $o)
|
||||
{
|
||||
|
@@ -11,31 +11,33 @@ use App\Models\User;
|
||||
|
||||
class TestEmail extends Mailable
|
||||
{
|
||||
use Queueable, SerializesModels;
|
||||
use Queueable, SerializesModels;
|
||||
|
||||
/**
|
||||
* Create a new message instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(User $o)
|
||||
{
|
||||
$this->user = $o;
|
||||
}
|
||||
public User $user;
|
||||
|
||||
/**
|
||||
* Build the message.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function build()
|
||||
{
|
||||
return $this
|
||||
->markdown('email.system.test_email')
|
||||
->subject('Just a test...')
|
||||
->with([
|
||||
'site'=>$this->user->site,
|
||||
'user'=>$this->user,
|
||||
]);
|
||||
}
|
||||
/**
|
||||
* Create a new message instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(User $o)
|
||||
{
|
||||
$this->user = $o;
|
||||
}
|
||||
|
||||
/**
|
||||
* Build the message.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function build()
|
||||
{
|
||||
return $this
|
||||
->markdown('email.system.test_email')
|
||||
->subject('Just a test...')
|
||||
->with([
|
||||
'site'=>$this->user->site,
|
||||
'user'=>$this->user,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
@@ -2,19 +2,21 @@
|
||||
|
||||
namespace App\Mail;
|
||||
|
||||
use App\Models\Site;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use Illuminate\Mail\Mailable;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
|
||||
use App\Models\AdslSupplier;
|
||||
use App\Models\{AdslSupplier,Site};
|
||||
|
||||
class TrafficMismatch extends Mailable
|
||||
{
|
||||
use Queueable, SerializesModels;
|
||||
|
||||
public AdslSupplier $aso;
|
||||
public Carbon $date;
|
||||
|
||||
/**
|
||||
* Create a new message instance.
|
||||
*
|
||||
|
Reference in New Issue
Block a user