Skip to content

Commit fdcb4b6

Browse files
committed
apple events 2024
1 parent dc37439 commit fdcb4b6

1 file changed

Lines changed: 49 additions & 0 deletions

File tree

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
<?php
2+
3+
namespace App\Console\Commands\excel;
4+
5+
use App\Imports\AppleEventsImport;
6+
use Illuminate\Console\Command;
7+
use Illuminate\Support\Facades\Log;
8+
use Maatwebsite\Excel\Facades\Excel;
9+
10+
class AppleEvents extends Command
11+
{
12+
/**
13+
* The name and signature of the console command.
14+
*
15+
* @var string
16+
*/
17+
protected $signature = 'excel:apple';
18+
19+
/**
20+
* The console command description.
21+
*
22+
* @var string
23+
*/
24+
protected $description = 'Apple Events 2024 From Excel File';
25+
26+
/**
27+
* Create a new command instance.
28+
*
29+
* @return void
30+
*/
31+
public function __construct()
32+
{
33+
parent::__construct();
34+
}
35+
36+
/**
37+
* Execute the console command.
38+
*/
39+
public function handle(): void
40+
{
41+
Log::info('Loading Apple Excel File');
42+
43+
Excel::import(
44+
new AppleEventsImport(),
45+
'Apple_events_code_week_2024_BATCH1.xlsx',
46+
'excel'
47+
);
48+
}
49+
}

0 commit comments

Comments
 (0)