Skip to content

Commit 04b1494

Browse files
committed
Fire ApplicationBooted event
1 parent e97d007 commit 04b1494

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

src/Events/App/ApplicationBooted.php

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?php
2+
3+
namespace Native\Laravel\Events\App;
4+
5+
use Illuminate\Broadcasting\Channel;
6+
use Illuminate\Broadcasting\InteractsWithSockets;
7+
use Illuminate\Contracts\Broadcasting\ShouldBroadcastNow;
8+
use Illuminate\Foundation\Events\Dispatchable;
9+
use Illuminate\Queue\SerializesModels;
10+
11+
class ApplicationBooted
12+
{
13+
use Dispatchable, InteractsWithSockets, SerializesModels;
14+
15+
public function __construct(public $path)
16+
{
17+
18+
}
19+
}

src/Http/Controllers/NativeAppBootedController.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace Native\Laravel\Http\Controllers;
44

55
use Illuminate\Http\Request;
6+
use Native\Laravel\Events\App\ApplicationBooted;
67

78
class NativeAppBootedController
89
{
@@ -11,6 +12,8 @@ public function __invoke(Request $request)
1112
$provider = app(config('native-php.provider'));
1213
$provider->boot();
1314

15+
event(new ApplicationBooted());
16+
1417
return response()->json([
1518
'success' => true,
1619
]);

0 commit comments

Comments
 (0)