Here's the output of dump(Grav::instance()['uri']):

I've tried to get #paths[2] this way Grav::instance()['uri']->paths[2], but i'm getting this error: Cannot access protected property Grav\Common\Uri::$paths
Community guidelines
Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.
Here's the output of dump(Grav::instance()['uri']):

I've tried to get #paths[2] this way Grav::instance()['uri']->paths[2], but i'm getting this error: Cannot access protected property Grav\Common\Uri::$paths
It's protected by the class definition. You're not allowed to access it directly. What exactly are you trying to get out of the object? If you look at the URI API, you'll see there's a path() method that may get you what you're looking for.
Log in to reply.
| Topic | Participants | Replies | Views | Activity |
|---|---|---|---|---|
| 2 | 82 | 12 hours ago | ||
| 1 | 55 | 16 hours ago | ||
| 0 | 45 | 1 day ago | ||
| 6 | 348 | 5 days ago | ||
| 3 | 43 | 5 days ago |