Skip to content

Commit bef3174

Browse files
authored
Move BaseController rule before CLI
1 parent 9c9d27d commit bef3174

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

system/Config/Routes.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,16 +44,16 @@
4444
* It is called by Config\Routes, and has the $routes RouteCollection
4545
* already loaded up and ready for us to use.
4646
*/
47+
// Prevent access to BaseController
48+
$routes->add('basecontroller(:any)', function()
49+
{
50+
throw \CodeIgniter\Exceptions\PageNotFoundException::forPageNotFound();
51+
});
52+
4753
// Migrations
4854
$routes->cli('migrations/(:segment)/(:segment)', '\CodeIgniter\Commands\MigrationsCommand::$1/$2');
4955
$routes->cli('migrations/(:segment)', '\CodeIgniter\Commands\MigrationsCommand::$1');
5056
$routes->cli('migrations', '\CodeIgniter\Commands\MigrationsCommand::index');
5157

5258
// CLI Catchall - uses a _remap to call Commands
5359
$routes->cli('ci(:any)', '\CodeIgniter\CLI\CommandRunner::index/$1');
54-
55-
// Prevent access to BaseController
56-
$routes->add('basecontroller(:any)', function()
57-
{
58-
throw \CodeIgniter\Exceptions\PageNotFoundException::forPageNotFound();
59-
});

0 commit comments

Comments
 (0)