Search
 
SCRIPT & CODE EXAMPLE
 

PHP

how to set optional third parameter in routes of codeigniter

$routes->get('logout/(:any)', 'Login::logout/$1');
$routes->get('logout', 'Login::logout'); 

public function logout($param1 = null, $param2 = null, $param3 = null)
{
    var_dump($param1, $param2, $param3); exit;
}
Comment

codeigniter4 route optional parameter

$routes->get('logout', 'Login::logout')
$routes->get('logout/(:any)', 'Login::logout/$1')
$routes->get('logout/(:any)/(:any)', 'Login::logout/$1/$2')
$routes->get('logout/(:any)/(:any)/(:any)', 'Login::logout/$1/$2/$3')
$routes->get('logout/(:any)/(:any)/(:any)/(:any)', 'Login::logout/$1/$2/$3/$4')
$routes->get('logout/(:any)/(:any)/(:any)/(:any)/(:any)', 'Login::logout/$1/$2/$3/$4/$5') 
Comment

PREVIOUS NEXT
Code Example
Php :: enable extensions in php.ini 
Php :: Disabling Caching of Queries Laravel Model Cache 
Php :: image upload in php code with databases 
Php :: laravel multiple copy record 
Php :: laravel 8 carbon if date is today 
Php :: php null coalesce 
Php :: how to create foreign key in laravel 
Php :: php replace string 
Php :: php extract number from string without comma 
Php :: return json in php 
Php :: laravel mail cc 
Php :: twig resto 
Php :: PHP strip_tags — Strip HTML and PHP tags from a string 
Php :: join string php 
Php :: inverse hyperbolic cosine php 
Php :: laravel collection last 
Php :: laravel get file to browser send 
Php :: Artisan namespace 
Php :: php file storage 
Php :: laravel error messages 
Php :: spatie activity log 
Php :: how to loop by index in php 
Php :: get woocommerce my account page url 
Php :: what is Laravel Eloquent ORM. 
Php :: this php 
Php :: laravel nginx 
Php :: laravel migration char length 
Php :: select randomly from mysqli php 
Php :: laravel collection makeHidden 
Php :: mixed content laravel form target 
ADD CONTENT
Topic
Content
Source link
Name
5+3 =