Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 8
0.00% covered (danger)
0.00%
0 / 1
CRAP
0.00% covered (danger)
0.00%
0 / 1
SendExecutiveReport
0.00% covered (danger)
0.00%
0 / 8
0.00% covered (danger)
0.00%
0 / 1
6
0.00% covered (danger)
0.00%
0 / 1
 handle
0.00% covered (danger)
0.00%
0 / 8
0.00% covered (danger)
0.00%
0 / 1
6
1<?php
2
3namespace App\Console\Commands;
4
5use App\Http\Controllers\Notifications;
6use Illuminate\Console\Command;
7use Illuminate\Http\Request;
8use Illuminate\Support\Facades\Log;
9
10class SendExecutiveReport extends Command
11{
12    /**
13     * The name and signature of the console command.
14     *
15     * @var string
16     */
17    protected $signature = 'send:executive-report';
18
19    /**
20     * The console command description.
21     *
22     * @var string
23     */
24    protected $description = 'Send email executive report';
25
26    /**
27     * Execute the console command.
28     */
29    public function handle(): void
30    {
31        try {
32
33            $notifications = new Notifications;
34
35            $r = new Request([
36                'processed_by' => 'System',
37                'User-ID' => 1,
38            ]);
39
40            $notifications->send_executive($r);
41
42        } catch (\Exception $e) {
43            Log::channel('cron_send_executive_report')->error($e->getMessage());
44        }
45
46    }
47}