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 :: laravel eloquent get one column value 
Php :: laravel get file to browser send 
Php :: composer install phpWord 
Php :: laravel get namespace 
Php :: laravel blade array seearch select box 
Php :: PHP Ternary Operator With Elseif Example 
Php :: how to know if file is empty in php 
Php :: php ksort 
Php :: how to run php in js 
Php :: laravel resource 
Php :: display name cat product woocommerce 
Php :: spatie activity log 
Php :: PHP - AJAX and PHP 
Php :: datatables 
Php :: search query codeigniter 
Php :: Get data from array (from an API) in Laravel 
Php :: php photo upload 
Php :: this php 
Php :: copy file in php 
Php :: Clear any previous error php 
Php :: laravel looping checking if last record has reached 
Php :: php string variable 
Php :: woocommerce unset custom checkout field 
Php :: php fake stripe client 
Php :: php namespaces 
Php :: php create empty array with size 
Php :: php if cart is not empty 
Php :: delete all rows in table laravel foreign key 
Php :: morph relation laravel 
Php :: PHP code to read JSON string on server 
ADD CONTENT
Topic
Content
Source link
Name
3+6 =