Open LuisEstrada7 opened 1 year ago
Hello,
I do not see an error directly. Can you show me the request body in the network tab of the browser so that I can reconstruct everything?
Also maybe try to use the InputHandler of the library.
~ Marius
@DeveloperMarius
Add the network to the question, can you tell me where is the InputHandler?
Hey,
I will take a closer look at your issue tomorrow.
You can find the input handling in the documentation under input & parameters, I think.
This would be the best in your case:
# Only match specific keys
$values = input()->all([
'company_name',
'user_id'
]);
~ Marius
@DeveloperMarius Thanks! that worked for me.
public function insertUpdate(){
$values = input()->all();
var_dump($values['dni']);
echo "<br>";
var_dump($values);exit;
}
Great!
This project is no longer maintained. When you want PHP 8.x support, input validation etc. check out my fork https://github.com/DeveloperMarius/simple-php-router It has a few breaking changes but all pull requests & issues are solved there.
~ Marius
Great!
This project is no longer maintained. When you want PHP 8.x support, input validation etc. check out my fork https://github.com/DeveloperMarius/simple-php-router It has a few breaking changes but all pull requests & issues are solved there.
~ Marius
But it seems abandoned.
Hey,
I replyed to your question. I give my best to be up to date with the issues but I cannot always reply quickly.
~ Marius
The route works correctly but it seems that the data is not sent to my method since it does not let me use the values.
Project: https://github.com/LuisEstrada7/prueba-simple-php-router
index.php
routes.php
Use fetch JS to do the queries.
app.js
Persona.js
controller:
Can someone please tell me where the error is? Are you implementing the library wrong?
sent values:
network :