leaf
leaf copied to clipboard
request problem
im tryng to do a post controller, in my controller i have echo app()->request()->get('nombre'), to see what they are sending me, but when i use request the next html error appears:
Leaf\Exceptions\ErrorException: Undefined array key 1 in file C:\xampp\htdocs\PIA\vendor\leafs\http\src\Request.php on line 99 Stack trace:
- Leaf\Exceptions\ErrorException->() C:\xampp\htdocs\PIA\vendor\leafs\http\src\Request.php:99
- Leaf\Exception\Run->handleError() C:\xampp\htdocs\PIA\vendor\leafs\http\src\Request.php:99
- Leaf\Http\Request->input() C:\xampp\htdocs\PIA\vendor\leafs\http\src\Request.php:235
- Leaf\Http\Request->body() C:\xampp\htdocs\PIA\vendor\leafs\http\src\Request.php:216
- Leaf\Http\Request->get() C:\xampp\htdocs\PIA\app\controllers\UsuarioController.php:9
- App\Controllers\UsuarioController->agregar() C:\xampp\htdocs\PIA\vendor\leafs\router\src\Router\Core.php:550
- call_user_func_array() C:\xampp\htdocs\PIA\vendor\leafs\router\src\Router\Core.php:550
- Leaf\Router\Core->invoke() C:\xampp\htdocs\PIA\vendor\leafs\router\src\Router\Core.php:521
- Leaf\Router\Core->handle() C:\xampp\htdocs\PIA\vendor\leafs\router\src\Router\Core.php:466
- Leaf\Router\Core->run() C:\xampp\htdocs\PIA\vendor\leafs\leaf\src\App.php:382
- Leaf\App->run() C:\xampp\htdocs\PIA\vendor\leafs\mvc-core\src\Core.php:121
- Leaf\Core->runApplication() C:\xampp\htdocs\PIA\public\index.php:110
- require_once() C:\xampp\htdocs\PIA\index.php:28