klein / klein.php

A fast & flexible router
MIT License
2.66k stars 290 forks source link

Access "pathname()" method in view using $this->pathname() #407

Open altafhpatel opened 3 years ago

altafhpatel commented 3 years ago

This is not a bug this is the helping material

Paste this piece of code in

klein class folder > src > klein

public function pathname(Request $request = null) { $uri = $this->request->uri(); // Strip the query string from the URI $uri = strstr($uri, '?', true) ?: $uri; return $uri; }