File tree Expand file tree Collapse file tree 4 files changed +26
-291
lines changed
Expand file tree Collapse file tree 4 files changed +26
-291
lines changed Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace Native \Laravel \Concerns ;
4+
5+ trait HasUrl
6+ {
7+ protected string $ url = '' ;
8+
9+ public function url (string $ url ): self
10+ {
11+ $ this ->url = $ url ;
12+
13+ return $ this ;
14+ }
15+
16+ public function route (string $ route ): self
17+ {
18+ $ this ->url = route ($ route );
19+
20+ return $ this ;
21+ }
22+ }
Original file line number Diff line number Diff line change 44
55use Native \Laravel \Client \Client ;
66use Native \Laravel \Concerns \HasDimensions ;
7+ use Native \Laravel \Concerns \HasUrl ;
78use Native \Laravel \Concerns \HasVibrancy ;
89use Native \Laravel \Menu \Menu ;
910
1011class MenuBar
1112{
1213 use HasVibrancy;
1314 use HasDimensions;
14-
15- protected string $ url = '' ;
15+ use HasUrl;
1616
1717 protected string $ icon = '' ;
1818
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 55use Illuminate \Support \Facades \URL ;
66use Native \Laravel \Client \Client ;
77use Native \Laravel \Concerns \HasDimensions ;
8+ use Native \Laravel \Concerns \HasUrl ;
89use Native \Laravel \Concerns \HasVibrancy ;
910
1011class Window
1112{
1213 use HasVibrancy;
1314 use HasDimensions;
14-
15- protected string $ url = '' ;
15+ use HasUrl;
1616
1717 protected $ manageState = false ;
1818
@@ -48,13 +48,6 @@ public function id(string $id = 'main'): self
4848 return $ this ;
4949 }
5050
51- public function url (string $ url ): self
52- {
53- $ this ->url = $ url ;
54-
55- return $ this ;
56- }
57-
5851 public function title (string $ title ): self
5952 {
6053 $ this ->title = $ title ;
You can’t perform that action at this time.
0 commit comments