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 4
4
5
5
use Native \Laravel \Client \Client ;
6
6
use Native \Laravel \Concerns \HasDimensions ;
7
+ use Native \Laravel \Concerns \HasUrl ;
7
8
use Native \Laravel \Concerns \HasVibrancy ;
8
9
use Native \Laravel \Menu \Menu ;
9
10
10
11
class MenuBar
11
12
{
12
13
use HasVibrancy;
13
14
use HasDimensions;
14
-
15
- protected string $ url = '' ;
15
+ use HasUrl;
16
16
17
17
protected string $ icon = '' ;
18
18
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 5
5
use Illuminate \Support \Facades \URL ;
6
6
use Native \Laravel \Client \Client ;
7
7
use Native \Laravel \Concerns \HasDimensions ;
8
+ use Native \Laravel \Concerns \HasUrl ;
8
9
use Native \Laravel \Concerns \HasVibrancy ;
9
10
10
11
class Window
11
12
{
12
13
use HasVibrancy;
13
14
use HasDimensions;
14
-
15
- protected string $ url = '' ;
15
+ use HasUrl;
16
16
17
17
protected $ manageState = false ;
18
18
@@ -48,13 +48,6 @@ public function id(string $id = 'main'): self
48
48
return $ this ;
49
49
}
50
50
51
- public function url (string $ url ): self
52
- {
53
- $ this ->url = $ url ;
54
-
55
- return $ this ;
56
- }
57
-
58
51
public function title (string $ title ): self
59
52
{
60
53
$ this ->title = $ title ;
You can’t perform that action at this time.
0 commit comments