Dave Hollingworth

Results 97 comments of Dave Hollingworth

@jackttcoms sorry no idea at the moment when it'll be available (current situation affecting things a bit!) - as soon as I can though!

You can have as many variables as you like in a route. You can then get them in the route_params property. For example: `$router->add('{controller}/{action}/{id:\d+}/{slug:\w+}');` Then in the action: ``` public...

> Could you not pass an array? I'm afraid not, that's not how the framework works at the moment with parameters.

@vince844 I'm not sure what you mean - each URL segment (e.g. /segment1/segment2 etc.) can correspond to a variable, so you could have something like this: /users/123/orders/345/product-1 and so on....

If you're updating data, you should really be using POST. If you have values in a form using the POST method, you can get them in the `$_POST` array.

@mosafer72 You can't do that with a single route in this framework, you'd have to add two routes: ``` $router->add('product/{id}/{slug}', ['controller' => 'Product', 'action' => 'index']); $router->add('product/{id}', ['controller' => 'Product',...

Do you get an error when you use that route? If so, what does it say? That route looks fine - if you have that route, with the URL /contacts/index/5,...

Currently that is the way you'd have to do it - you could modify the router though if you like, adding something like the following inside the loop where the...

To call a method in a model class, you need to create an instance of that class, is that what you meant?

Ok... please can you describe the huge problem in more detail?