12-01-2018, 07:16 PM
I am currently trying to make things clean and neat and using the same endpoints for different things such as GET to /login - shows login page but POST to /login starts the login process. Going by the docs you can do this:
BUT this then throws the following error:
I tried putting ['GET'] against the first line but didn't seem to make any difference. Any help much appreciated.
PHP Code:
$route['login'] = 'auth/login';
$route['login']['POST'] = 'auth/loginProcess';
BUT this then throws the following error:
Quote:A PHP Error was encountered
Severity: Warning
Message: Illegal string offset 'POST'
Filename: config/routes.php
Line Number: 57
I tried putting ['GET'] against the first line but didn't seem to make any difference. Any help much appreciated.