Welcome Guest, Not a member yet? Register   Sign In
Dealing with route (universal search)
#5

(This post was last modified: 08-17-2023, 05:31 PM by kenjis.)

PHP Code:
<?php

namespace App\Controllers;

class 
Home extends BaseController
{
    public function index($date$user): string
    
{
        // in real site, you should validate $date and $user values.

        return '$date: ' esc($date) . ', $user: ' esc($user);
    }


PHP Code:
$routes->get('(:num)/(:segment)''Home::index/$1/$2'); 

Navigate to http://localhost:8080/20230810/jack
Reply


Messages In This Thread
RE: Dealing with route (universal search) - by kenjis - 08-16-2023, 06:39 PM



Theme © iAndrew 2016 - Forum software by © MyBB