Welcome Guest, Not a member yet? Register   Sign In
CodeIgniter 4 routes not working properly
#1
Sad 

I just got into CI4 from a CI3 background but I'm finding it difficult to get routes to display the appropriate view. Even though I have written the code in the controller properly to load a view, it always returns index.php no matter what instead of the correct view even when I enter a non-existent route. The 404 page doesn't show either. Please, what am I missing?

Here's my controller code:
Code:
<?php

namespace App\Controllers;

class Shop extends BaseController
{
    public function index()
    {
        return view('shop');
    }
}


Here's the result I get on the browser:


[Image: oHp2z.png]
Reply


Messages In This Thread
CodeIgniter 4 routes not working properly - by DanielTheGeek - 11-17-2020, 05:04 PM



Theme © iAndrew 2016 - Forum software by © MyBB