Category : parameters

Im trying to make a very simple routing system in PHP. Right now it look something like this: function router() { if($url === ‘/login’) { $page = ‘../private/login.php’; } else if($url === ‘/password-recovery’) { $page = ‘../private/pass-rec.php’; } else if($url === "/password-reset") { $page = ‘../private/pass-reset.php’; } include_once($page); } This is working fine, but i ..

Read more

I would like to know how to use the parameter converter with two different objects. I found this answer but I cannot apply it? I don’t know where from "class=Appbundle:fruits" How to use multiple routes and multiple param converter with Symfony use …. ??? /** * * @Route("/pole/test/{id}", name="routeTest") * @ParamConverter("Player", ???="Player::class") * @Route("/pole/testB/{id}", name="routeTestB") ..

Read more

Basically I am interested in there being any advantages for not using parameters in the url of a website. E.g. exampleurl.com/?user=Peter // is what it would look like using parameters for database queries exampleurl.com/user/Peter // is what it could look like given you retrieve the url in php, create an array (using ‘/’ as separation) ..

Read more