- Work done on base from routes
This commit is contained in:
1 parent
fa0430a3fc
commit
eac8269c48
2 files changed
+10
No files matched your search
@@ -17,6 +17,11 @@ class Route implements \Notes\Attribute {
|
||||
public string $description = "",
|
||||
) {}
|
||||
|
||||
public function getBase() : ?string
|
||||
{
|
||||
return $this->base ? rtrim($this->base, '/') : null;
|
||||
}
|
||||
|
||||
public function getRoute() : string
|
||||
{
|
||||
return rtrim("/" . trim(isset($this->base) ?
|
||||
|
||||
@@ -9,4 +9,9 @@ class Route implements \Notes\Attribute {
|
||||
# NULL will fallback on nearest base
|
||||
public null|string $base = null,
|
||||
){}
|
||||
|
||||
public function getBase() : ?string
|
||||
{
|
||||
return $this->base ? rtrim($this->base, '/') : null;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user