Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 6 |
|
0.00% |
0 / 2 |
CRAP | |
0.00% |
0 / 1 |
| SendRequestNotification | |
0.00% |
0 / 6 |
|
0.00% |
0 / 2 |
12 | |
0.00% |
0 / 1 |
| __construct | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| handle | |
0.00% |
0 / 5 |
|
0.00% |
0 / 1 |
6 | |||
| 1 | <?php |
| 2 | |
| 3 | namespace App\Console\Commands; |
| 4 | |
| 5 | use App\Http\Controllers\Notifications; |
| 6 | use Illuminate\Console\Command; |
| 7 | use Illuminate\Support\Facades\Log; |
| 8 | |
| 9 | class SendRequestNotification extends Command |
| 10 | { |
| 11 | /** |
| 12 | * The name and signature of the console command. |
| 13 | * |
| 14 | * @var string |
| 15 | */ |
| 16 | protected $signature = 'send:request-notification'; |
| 17 | |
| 18 | /** |
| 19 | * The console command description. |
| 20 | * |
| 21 | * @var string |
| 22 | */ |
| 23 | protected $description = 'Send email request notification'; |
| 24 | |
| 25 | /** |
| 26 | * Create a new command instance. |
| 27 | * |
| 28 | * @return void |
| 29 | */ |
| 30 | public function __construct() |
| 31 | { |
| 32 | parent::__construct(); |
| 33 | } |
| 34 | |
| 35 | /** |
| 36 | * Execute the console command. |
| 37 | * |
| 38 | * @return int |
| 39 | */ |
| 40 | public function handle() |
| 41 | { |
| 42 | try { |
| 43 | |
| 44 | $notifications = new Notifications; |
| 45 | $notifications->send_request_notification(1); |
| 46 | |
| 47 | } catch (\Exception $e) { |
| 48 | Log::channel('cron_send_request_notification')->error($e->getMessage()); |
| 49 | } |
| 50 | |
| 51 | return 0; |
| 52 | } |
| 53 | } |