File tree Expand file tree Collapse file tree 2 files changed +33
-0
lines changed
Expand file tree Collapse file tree 2 files changed +33
-0
lines changed Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace Native \Laravel \Events \Windows ;
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 WindowHidden implements ShouldBroadcastNow
12+ {
13+ use Dispatchable, InteractsWithSockets, SerializesModels;
14+
15+ public function __construct (public string $ id )
16+ {
17+ //
18+ }
19+
20+ public function broadcastOn ()
21+ {
22+ return [
23+ new Channel ('nativephp ' ),
24+ ];
25+ }
26+ }
Original file line number Diff line number Diff line change @@ -26,6 +26,13 @@ public function close($id = null)
2626 ]);
2727 }
2828
29+ public function hide ($ id = null )
30+ {
31+ return $ this ->client ->post ('window/hide ' , [
32+ 'id ' => $ id ?? $ this ->detectId (),
33+ ]);
34+ }
35+
2936 public function current ()
3037 {
3138 return (object ) $ this ->client ->get ('window/current ' )->json ();
You can’t perform that action at this time.
0 commit comments