Skip to content

Commit

Permalink
Improves routes loading for routes caching
Browse files Browse the repository at this point in the history
  • Loading branch information
michellaurent authored Jul 25, 2024
1 parent ce9e7a8 commit c6a0ea8
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions src/Providers/Service.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,11 @@ class Service extends ServiceProvider
{
public function boot()
{
app('router')->group(app("router")->hasMiddlewareGroup('web')
? ['middleware' => 'web']
: [], function () {
require __DIR__ . '/../../routes/web.php';
$this->loadRoutesFrom(__DIR__.'/../../routes/web.php');

if (config("app.env") === 'internaltesting') {
require __DIR__ . '/../../tests/routes/web.php';
}
});
if (config("app.env") === 'internaltesting') {
$this->loadRoutesFrom(__DIR__.'/../../tests/routes/web.php');
}

$configPath = __DIR__ . '/../../config/genealabs-laravel-caffeine.php';
$this->mergeConfigFrom($configPath, 'genealabs-laravel-caffeine');
Expand Down

0 comments on commit c6a0ea8

Please sign in to comment.