Welcome Guest, Not a member yet? Register   Sign In
unexpected route problem
#1

(This post was last modified: 05-02-2023, 07:00 AM by anuragk.)

if I use

Code:
$routes->post('login', 'Admin::do_login');

everything works as expected

but when I use

Code:
$routes->match(['get', 'post'], 'login', [Admin::class, 'do_login']);


I get an error

404 Controller or its method is not found: \Config\Admin::do_login

am I doing anything wrong?

The class name is Admin and the method name is do_login
The controller file name is Admin.php
Reply


Messages In This Thread
unexpected route problem - by anuragk - 05-02-2023, 07:00 AM
RE: unexpected route problem - by iRedds - 05-02-2023, 07:09 AM
RE: unexpected route problem - by anuragk - 05-02-2023, 07:13 AM
RE: unexpected route problem - by iRedds - 05-02-2023, 03:42 PM
RE: unexpected route problem - by anuragk - 05-02-2023, 10:11 PM
RE: unexpected route problem - by kenjis - 05-02-2023, 05:03 PM



Theme © iAndrew 2016 - Forum software by © MyBB