File tree Expand file tree Collapse file tree 2 files changed +51
-0
lines changed Expand file tree Collapse file tree 2 files changed +51
-0
lines changed Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace Native \Laravel \Facades ;
4+
5+ use Illuminate \Support \Facades \Facade ;
6+
7+ class Shell extends Facade
8+ {
9+ protected static function getFacadeAccessor ()
10+ {
11+ return \Native \Laravel \Shell::class;
12+ }
13+ }
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace Native \Laravel ;
4+
5+ use Native \Laravel \Client \Client ;
6+
7+ class Shell
8+ {
9+ public function __construct (protected Client $ client )
10+ {
11+ }
12+
13+ public function showInFolder (string $ path ): void
14+ {
15+ $ this ->client ->post ('shell/show-item-in-folder ' , [
16+ 'path ' => $ path ,
17+ ]);
18+ }
19+
20+ public function openFile (string $ path ): string
21+ {
22+ return $ this ->client ->post ('shell/open-item ' , [
23+ 'path ' => $ path ,
24+ ])->json ('result ' );
25+ }
26+
27+ public function openExternal (string $ url ): void
28+ {
29+ $ this ->client ->post ('shell/open-external ' , [
30+ 'url ' => $ url ,
31+ ]);
32+ }
33+
34+ public function displays (): array
35+ {
36+ return $ this ->client ->get ('screen/displays ' )->json ('displays ' );
37+ }
38+ }
You can’t perform that action at this time.
0 commit comments