Welcome Guest, Not a member yet? Register   Sign In
Array Callable route
#3

(This post was last modified: 07-16-2022, 12:31 AM by luckmoshy.)

(07-15-2022, 08:23 AM)iRedds Wrote: What errors?

Sorry for the late reply @iRedds yes! I faceĀ 
PHP Code:
//(This woks fine but for array how to do?) 
//$routes->match(['get','post'],'login', 'AuthController::login',['as'=>'login']); 

PHP Code:
explode(): Argument #2 ($string) must be of type string, array given 

I use this assoc array way so what is the best way to do this route as a named route?

PHP Code:
<?=base_url(route_to('login'))?>
PHP Code:
$routes->match(['get','post'],'login', [AuthController::class, 'login','as'=>'login']); 
Codeigniter First, Codeigniter Then You!!
yekrinaDigitals

Reply


Messages In This Thread
Array Callable route - by luckmoshy - 07-15-2022, 05:51 AM
RE: Array Callable route - by iRedds - 07-15-2022, 08:23 AM
RE: Array Callable route - by luckmoshy - 07-15-2022, 11:57 PM
RE: Array Callable route - by InsiteFX - 07-16-2022, 12:33 AM
RE: Array Callable route - by luckmoshy - 07-16-2022, 12:49 AM
RE: Array Callable route - by iRedds - 07-16-2022, 12:48 AM
RE: Array Callable route - by kenjis - 07-16-2022, 03:56 PM
RE: Array Callable route - by InsiteFX - 07-16-2022, 11:34 PM
RE: Array Callable route (solved) - by luckmoshy - 07-17-2022, 05:31 AM



Theme © iAndrew 2016 - Forum software by © MyBB