diff --git a/CHANGELOG.md b/CHANGELOG.md index f20fb83..7c22bdd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ - Updated [Rebing/GraphQL](https://github.com/rebing/graphql-laravel) Dependency from version 8.6 to 9.2 - Updated [Rcrowe/TwigBridge](https://github.com/rcrowe/TwigBridge) Dependency from version 0.14.1 to 0.14.3 - Relaxed GraphQL handling of fieldtypes during schema generation. Now errors will be logged but schemas can still be built +- Default url for ExpressionEngine Control Panel is now `admin` instead of `admin.php`. This can be changed in `config/coilpack.php`. ## [1.4.2] - 2024-09-26 diff --git a/config/coilpack.php b/config/coilpack.php index 9cd4a74..2faf1df 100644 --- a/config/coilpack.php +++ b/config/coilpack.php @@ -20,7 +20,7 @@ /** * URL to access the ExpressionEngine control panel */ - 'admin_url' => 'admin.php', + 'admin_url' => 'admin', /** * If you wish to provide your own implementation of the Member model diff --git a/routes/web.php b/routes/web.php index ad31d18..c8fbbe5 100644 --- a/routes/web.php +++ b/routes/web.php @@ -10,7 +10,7 @@ */ Route::any( - config('coilpack.admin_url', 'admin.php'), + config('coilpack.admin_url', 'admin'), \Expressionengine\Coilpack\Controllers\AdminController::class )->name('coilpack.admin'); diff --git a/src/Bootstrap/LoadExpressionEngine.php b/src/Bootstrap/LoadExpressionEngine.php index 615ecad..bb2e9f5 100644 --- a/src/Bootstrap/LoadExpressionEngine.php +++ b/src/Bootstrap/LoadExpressionEngine.php @@ -83,8 +83,8 @@ public function controlPanel() putenv('EE_INSTALL_MODE=FALSE'); $this->constants['REQ'] = 'CP'; $this->constants['MASKED_CP'] = true; - $this->constants['SELF'] = config('coilpack.admin_url', config('coilpack.admin_url', 'admin.php')); - $this->constants['EESELF'] = config('coilpack.admin_url', config('coilpack.admin_url', 'admin.php')); + $this->constants['SELF'] = config('coilpack.admin_url', 'admin'); + $this->constants['EESELF'] = config('coilpack.admin_url', 'admin'); return $this; } @@ -116,8 +116,8 @@ public function updater() [ 'REQ' => 'CP', 'MASKED_CP' => true, - 'SELF' => config('coilpack.admin_url', 'admin.php'), - 'EESELF' => config('coilpack.admin_url', 'admin.php'), + 'SELF' => config('coilpack.admin_url', 'admin'), + 'EESELF' => config('coilpack.admin_url', 'admin'), 'INSTALL_MODE' => true, ] ); @@ -130,8 +130,8 @@ public function installer() putenv('EE_INSTALL_MODE=TRUE'); $this->constants['REQ'] = 'CP'; $this->constants['MASKED_CP'] = true; - $this->constants['SELF'] = config('coilpack.admin_url', 'admin.php'); - $this->constants['EESELF'] = config('coilpack.admin_url', 'admin.php'); + $this->constants['SELF'] = config('coilpack.admin_url', 'admin'); + $this->constants['EESELF'] = config('coilpack.admin_url', 'admin'); $this->constants['INSTALL_MODE'] = true; // Offer some convenient defaults for install wizard @@ -150,9 +150,9 @@ public function installer() // The SCRIPT_FILENAME must match EESELF constant defined above. // The installer/controller/wizard.php file uses both values to determine the base_path - $_SERVER['SCRIPT_FILENAME'] = realpath($this->basePath).Str::start(config('coilpack.admin_url', 'admin.php'), '/'); + $_SERVER['SCRIPT_FILENAME'] = realpath($this->basePath).Str::start(config('coilpack.admin_url', 'admin'), '/'); // PHP_SELF is used to determine the site_url in installer/controller/wizard - $_SERVER['PHP_SELF'] = Str::start(config('coilpack.admin_url', 'admin.php'), '/'); + $_SERVER['PHP_SELF'] = Str::start(config('coilpack.admin_url', 'admin'), '/'); return $this; } diff --git a/src/Commands/CoilpackCommand.php b/src/Commands/CoilpackCommand.php index 9963746..d9ed734 100644 --- a/src/Commands/CoilpackCommand.php +++ b/src/Commands/CoilpackCommand.php @@ -164,7 +164,7 @@ public function install() $this->installRelease($releases[$release]); - $this->info('Finish installing ExpressionEngine at '.url(config('coilpack.admin_url', 'admin.php'))); + $this->info('Finish installing ExpressionEngine at '.url(config('coilpack.admin_url', 'admin'))); } public function availableReleases() diff --git a/src/Routing/CoilpackRoutes.php b/src/Routing/CoilpackRoutes.php index 49bc71c..57f62fd 100644 --- a/src/Routing/CoilpackRoutes.php +++ b/src/Routing/CoilpackRoutes.php @@ -18,7 +18,7 @@ public function coilpack() $this->group(['namespace' => $namespace], function () use ($options) { if ($options['admin'] ?? true) { $this->any( - config('coilpack.admin_url', 'admin.php'), \Expressionengine\Coilpack\Controllers\AdminController::class + config('coilpack.admin_url', 'admin'), \Expressionengine\Coilpack\Controllers\AdminController::class )->name('coilpack.admin'); }