updated contract mailer in contractadmincontroller
This commit is contained in:
1
.env
1
.env
@@ -38,6 +38,7 @@ ESI_SECRET_KEY=TdnNGRM8RTNSifZdaIc9yHTTkYPgYEEXHRIbT6oY
|
||||
ESI_USERAGENT='W4RP Services'
|
||||
ESI_CALLBACK_URI='http://services.w4rp.space/callback'
|
||||
ESI_PRIMARY_CHAR=93738489
|
||||
ESI_ALLIANCE=99004116
|
||||
|
||||
EVEONLINE_CLIENT_ID=e5848fea3618427a8ee0dccb6a04fc62
|
||||
EVEONLINE_CLIENT_SECRET=TdnNGRM8RTNSifZdaIc9yHTTkYPgYEEXHRIbT6oY
|
||||
|
||||
@@ -184,21 +184,15 @@ class ContractAdminController extends Controller
|
||||
}
|
||||
|
||||
private function NewContractMail() {
|
||||
//Get all the users with a specific permission set
|
||||
$users = UserPermission::where(['permission' => 'contract.canbid'])->get()->toArray();
|
||||
|
||||
//Get the esi config
|
||||
$config = config('esi');
|
||||
|
||||
//Cycle through the users with the correct permission and send a mail to go out with the queue system.
|
||||
foreach($users as $user) {
|
||||
$mail = new JobSendEveMail;
|
||||
$mail->sender = $config['primary'];
|
||||
$mail->subject = 'New Alliance Contract Available';
|
||||
$mail->recipient = $user['character_id'];
|
||||
$mail->recipient_type = 'character';
|
||||
$mail->body = "A new contract is available for the alliance contracting system. Please check out <a href='https://services.w4rp.space'>Services Site</a>.";
|
||||
$mail->subject = 'New Alliance Production Contract Available';
|
||||
$mail->recipient = $config['alliance'];
|
||||
$mail->recipient_type = 'alliance';
|
||||
$mail->body = "A new contract is available for the alliance contracting system. Please check out <a href='https://services.w4rp.space'>Services Site</a> if you want to bid on the production contract.<br><br>Sincerely,<br>Warped Intentions Leadership";
|
||||
ProcessSendEveMailJob::dispatch($mail)->onQueue('mail');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,8 +18,6 @@ class AuthServiceProvider extends ServiceProvider
|
||||
|
||||
/**
|
||||
* Register any authentication / authorization services.
|
||||
* These gates will always choose the highest roles
|
||||
* We use gates in some of the graphics, but will work to utilize if statements instead shortly
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
@@ -5,5 +5,6 @@
|
||||
'useragent' => env('ESI_USERAGENT'),
|
||||
'callback' => env('ESI_CALLBACK_URI'),
|
||||
'primary' => env('ESI_PRIMARY_CHAR', 93738489),
|
||||
'alliance' => env('ESI_ALLIANCE', 99004116),
|
||||
];
|
||||
?>
|
||||
Reference in New Issue
Block a user