write me a warner
This commit is contained in:
25
app/Console/WarnDev.php
Normal file
25
app/Console/WarnDev.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
namespace App\Console;
|
||||
|
||||
use App\Models\System\Warning;
|
||||
use Illuminate\Console\Command;
|
||||
|
||||
class WarnDev extends Command
|
||||
{
|
||||
/**
|
||||
* Notify me if any unresolved warnings exists
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __invoke()
|
||||
{
|
||||
$warnings = Warning::whereNull('resolved_at')->get();
|
||||
|
||||
if ($warnings->isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
sendSMS('61929248', 'Warnings: '.$warnings->count());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user