Welcome Guest, Not a member yet? Register   Sign In
display method issue
#1

Hello
I have following issue. I've created new controller and added index($id) method with the parameter $id, But I receive an 404_error when I try to open the url localhost/subscription/111
This url works correctly localhost/subscription/index/111
When I remove parameter from the method, the method also works well, but I have to use this url localhost/subscription/111 instead of localhost/subscription/index/111
Could you advise how to resolve this issue?
here is my code:
PHP Code:
class Subscription extends ClientsController
{
    public function __construct() {
        parent::__construct();
    }
    public function index$id ) { 
PHP Code:
        echo $id;
    }

Reply
#2

Hi,
Share the Config/Routes.php code.
Reply
#3

(03-27-2023, 05:14 AM)datamweb Wrote: Hi,
Share the Config/Routes.php code.
thank you for the assistment, I've  checked the Config/Routes.php and added new route there.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB