01-24-2019, 04:03 AM
How can i access my controller located in “folder_name/controller_name” in codeigniter 4?
404 - File Not Found Controller or its method is not found: {0}::{1}
What am i missing?
Quote:My Master controller located in "admin" folder. View image
Code:
namespace App\Controllers\admin;
use CodeIgniter\Controller;
class Master extends Controller
{
function __construct(){
helper('url');
}
public function index()
{
$data["content"]="view_home";
echo view('template/template', $data);
}
}
Quote:In my Routes.php i added this
Code:
$routes->get('admin/master','Master::index',['namespace','App\Controllers\admin']);
Quote:when i access the page in the browser i get this error
404 - File Not Found Controller or its method is not found: {0}::{1}
What am i missing?