-
Notifications
You must be signed in to change notification settings - Fork 0
URL Routing
Furrows allows you to use pretty urls with url rewriting.
It's a choice to explicitly use this pattern for urls
http://mydomain/my/path/to/my/app/folder/ controller name / method name / first parameter name : first parameter value / second parameter name : second parameter value / ...
You can see an example here
Note:
Furrows uses the ReflexionClass in order to call the controller's method by providing a parameters validation.
Example:
http://mydomain.com/posts/all
class Posts extends Controller
public function all()
{
//put your logic here
}
http://mydomain.com/posts/view/id:123 or http://mydomain.com/posts/view/
class Posts extends Controller
public function view($id = null)
{
//put your logic here
}
http://mydomain.com/posts/delete/id:123
class Posts extends Controller
public function view($id)
{
//put your logic here
}