@@ -42,7 +42,7 @@ public function __construct()
4242 public function handle ()
4343 {
4444 $ settings = Setting::getSettings ();
45- $ threshold = $ settings ->alert_interval ;
45+ $ alert_interval = $ settings ->alert_interval ;
4646
4747 if (($ settings ->alert_email != '' ) && ($ settings ->alerts_enabled == 1 )) {
4848
@@ -51,18 +51,18 @@ public function handle()
5151 ->map (fn ($ item ) => trim ($ item )) // Trim each email
5252 ->all ();
5353 // Expiring Assets
54- $ assets = Asset::getExpiringWarrantee ($ threshold );
54+ $ assets = Asset::getExpiringWarrantee ($ alert_interval );
5555
5656 if ($ assets ->count () > 0 ) {
57- $ this ->info (trans_choice ('mail.assets_warrantee_alert ' , $ assets ->count (), ['count ' => $ assets ->count (), 'threshold ' => $ threshold ]));
58- Mail::to ($ recipients )->send (new ExpiringAssetsMail ($ assets , $ threshold ));
57+ $ this ->info (trans_choice ('mail.assets_warrantee_alert ' , $ assets ->count (), ['count ' => $ assets ->count (), 'threshold ' => $ alert_interval ]));
58+ Mail::to ($ recipients )->send (new ExpiringAssetsMail ($ assets , $ alert_interval ));
5959 }
6060
6161 // Expiring licenses
62- $ licenses = License::getExpiringLicenses ($ threshold );
62+ $ licenses = License::getExpiringLicenses ($ alert_interval );
6363 if ($ licenses ->count () > 0 ) {
64- $ this ->info (trans_choice ('mail.license_expiring_alert ' , $ licenses ->count (), ['count ' => $ licenses ->count (), 'threshold ' => $ threshold ]));
65- Mail::to ($ recipients )->send (new ExpiringLicenseMail ($ licenses , $ threshold ));
64+ $ this ->info (trans_choice ('mail.license_expiring_alert ' , $ licenses ->count (), ['count ' => $ licenses ->count (), 'threshold ' => $ alert_interval ]));
65+ Mail::to ($ recipients )->send (new ExpiringLicenseMail ($ licenses , $ alert_interval ));
6666 }
6767 } else {
6868 if ($ settings ->alert_email == '' ) {
0 commit comments