Welcome Guest, Not a member yet? Register   Sign In
Myth/Auth - Routing problem
#7

My problem is of a similar nature, so I did not begin to create a new topic.
I still use modular code, it is very convenient. But now I am faced with an incomprehensible problem.

I have a user module, in its config there is a route that consists of a simple group:

PHP Code:
$routes->group('user', ['namespace' => 'Modules\User\Controllers'], function($routes)
{

    $routes->get('/',       'User::index');
    $routes->post('add',    'User::createUser');
}); 

After my form(method="POST") located at the address, site/user/, sends data to the address site/user/add, a message appears with the following text:

Code:
404 - File Not Found
Controller or its method is not found: User::add

It turns out that the get method works and the post does not ... 

Tell me what is my mistake? There is almost nothing in the APP\Co..\Routes.php except :
$routes->setTranslateURIDashes(false);
$routes->set404Override();
$routes->setAutoRoute(true);

Thanks!
Reply


Messages In This Thread
Myth/Auth - Routing problem - by BilltheCat - 04-12-2020, 04:23 PM
RE: Myth/Auth - Routing problem - by includebeer - 04-12-2020, 06:17 PM
RE: Myth/Auth - Routing problem - by BilltheCat - 04-12-2020, 08:23 PM
RE: Myth/Auth - Routing problem - by BilltheCat - 04-13-2020, 04:25 AM
RE: Myth/Auth - Routing problem - by includebeer - 04-13-2020, 04:26 AM
RE: Myth/Auth - Routing problem - by BilltheCat - 04-13-2020, 04:46 AM
RE: Myth/Auth - Routing problem - by Nome - 04-13-2020, 06:16 AM
RE: Myth/Auth - Routing problem - by includebeer - 04-13-2020, 06:39 AM
RE: Myth/Auth - Routing problem - by Nome - 04-13-2020, 06:51 AM
RE: Myth/Auth - Routing problem - by includebeer - 04-13-2020, 07:08 AM
RE: Myth/Auth - Routing problem - by Nome - 04-13-2020, 07:19 AM



Theme © iAndrew 2016 - Forum software by © MyBB