Closed cod3rshotout closed 3 years ago
Can you show route list?, try this command
php spark routes
Hi, @agungsugiarto here the routes:
CodeIgniter v4.1.1 Command Line Tool - Server Time: 2021-04-07 05:55:09 UTC-05:00
+--------+-------------------------------+--------------------------------------------------------------+ | Method | Route | Handler | +--------+-------------------------------+--------------------------------------------------------------+ | GET | / | \App\Controllers\Home::index | | GET | admin | \App\Controllers\DashboardController::index | | GET | admin/user/profile | \App\Controllers\Users\UserController::profile | | GET | admin/user/manage | \App\Controllers\Users\UserController::index | | GET | admin/user/manage/new | \App\Controllers\Users\UserController::new | | GET | admin/user/manage/(.)/edit | \App\Controllers\Users\UserController::edit/$1 | | GET | admin/permission | \App\Controllers\Users\PermissionController::index | | GET | admin/permission/(.)/edit | \App\Controllers\Users\PermissionController::edit/$1 | | GET | admin/role | \App\Controllers\Users\RoleController::index | | GET | admin/role/new | \App\Controllers\Users\RoleController::new | | GET | admin/role/(.)/edit | \App\Controllers\Users\RoleController::edit/$1 | | GET | admin/role/(.) | \App\Controllers\Users\RoleController::show/$1 | | GET | admin/menu | \App\Controllers\Users\MenuController::index | | GET | admin/menu/(.)/edit | \App\Controllers\Users\MenuController::edit/$1 | | GET | admin/blog/post | \App\Controllers\Blogs\PostController::index | | GET | admin/blog/post/new | \App\Controllers\Blogs\PostController::new | | GET | admin/blog/post/(.)/edit | \App\Controllers\Blogs\PostController::edit/$1 | | GET | admin/blog/category | \App\Controllers\Blogs\CategoryController::index | | GET | admin/blog/category/new | \App\Controllers\Blogs\CategoryController::new | | GET | admin/blog/category/(.)/edit | \App\Controllers\Blogs\CategoryController::edit/$1 | | GET | admin/blog/category/(.) | \App\Controllers\Blogs\CategoryController::show/$1 | | GET | admin/blog/tag | \App\Controllers\Blogs\TagController::index | | GET | admin/blog/tag/new | \App\Controllers\Blogs\TagController::new | | GET | admin/blog/tag/(.)/edit | \App\Controllers\Blogs\TagController::edit/$1 | | GET | admin/blog/tag/(.) | \App\Controllers\Blogs\TagController::show/$1 | | GET | login | \Myth\Auth\Controllers\AuthController::login | | GET | logout | \Myth\Auth\Controllers\AuthController::logout | | GET | register | \Myth\Auth\Controllers\AuthController::register | | GET | activate-account | \Myth\Auth\Controllers\AuthController::activateAccount | | GET | resend-activate-account | \Myth\Auth\Controllers\AuthController::resendActivateAccount | | GET | forgot | \Myth\Auth\Controllers\AuthController::forgotPassword | | GET | reset-password | \Myth\Auth\Controllers\AuthController::resetPassword | | POST | admin/user/profile | \App\Controllers\Users\UserController::profile | | POST | admin/user/manage | \App\Controllers\Users\UserController::create | | POST | admin/permission | \App\Controllers\Users\PermissionController::create | | POST | admin/role | \App\Controllers\Users\RoleController::create | | POST | admin/menu | \App\Controllers\Users\MenuController::create | | POST | admin/blog/post | \App\Controllers\Blogs\PostController::create | | POST | admin/blog/category | \App\Controllers\Blogs\CategoryController::create | | POST | admin/blog/tag | \App\Controllers\Blogs\TagController::create | | POST | login | \Myth\Auth\Controllers\AuthController::attemptLogin | | POST | register | \Myth\Auth\Controllers\AuthController::attemptRegister | | POST | forgot | \Myth\Auth\Controllers\AuthController::attemptForgot | | POST | reset-password | \Myth\Auth\Controllers\AuthController::attemptReset | | PATCH | admin/user/manage/(.) | \App\Controllers\Users\UserController::update/$1 | | PATCH | admin/permission/(.) | \App\Controllers\Users\PermissionController::update/$1 | | PATCH | admin/role/(.) | \App\Controllers\Users\RoleController::update/$1 | | PATCH | admin/menu/(.) | \App\Controllers\Users\MenuController::update/$1 | | PATCH | admin/blog/post/(.) | \App\Controllers\Blogs\PostController::update/$1 | | PATCH | admin/blog/category/(.) | \App\Controllers\Blogs\CategoryController::update/$1 | | PATCH | admin/blog/tag/(.) | \App\Controllers\Blogs\TagController::update/$1 | | PUT | admin/user/manage/(.) | \App\Controllers\Users\UserController::update/$1 | | PUT | admin/permission/(.) | \App\Controllers\Users\PermissionController::update/$1 | | PUT | admin/role/(.) | \App\Controllers\Users\RoleController::update/$1 | | PUT | admin/menu/(.) | \App\Controllers\Users\MenuController::update/$1 | | PUT | admin/menu-update | \App\Controllers\Users\MenuController::new | | PUT | admin/blog/post/(.) | \App\Controllers\Blogs\PostController::update/$1 | | PUT | admin/blog/category/(.) | \App\Controllers\Blogs\CategoryController::update/$1 | | PUT | admin/blog/tag/(.) | \App\Controllers\Blogs\TagController::update/$1 | | DELETE | admin/user/manage/(.) | \App\Controllers\Users\UserController::delete/$1 | | DELETE | admin/permission/(.) | \App\Controllers\Users\PermissionController::delete/$1 | | DELETE | admin/role/(.) | \App\Controllers\Users\RoleController::delete/$1 | | DELETE | admin/menu/(.) | \App\Controllers\Users\MenuController::delete/$1 | | DELETE | admin/blog/post/(.) | \App\Controllers\Blogs\PostController::delete/$1 | | DELETE | admin/blog/category/(.) | \App\Controllers\Blogs\CategoryController::delete/$1 | | DELETE | admin/blog/tag/(.) | \App\Controllers\Blogs\TagController::delete/$1 | | CLI | migrations/([^/]+)/([^/]+) | \CodeIgniter\Commands\MigrationsCommand::$1/$2 | | CLI | migrations/([^/]+) | \CodeIgniter\Commands\MigrationsCommand::$1 | | CLI | migrations | \CodeIgniter\Commands\MigrationsCommand::index | | CLI | ci(.) | \CodeIgniter\CLI\CommandRunner::index/$1 | +--------+-------------------------------+--------------------------------------------------------------+
I have created a group routing which contains this structure:
and then I have defined the folder
Blogs
inside theControllers
directory. InsideBlogs
I have three controllers: CategoryController, PostController and TagController.This is the content of
PostController
:the weird thing is that when I try to access to the post page using this url: https://example.com/admin/blog/post I get:
how is that possible?