Skip to content

Commit e654eaf

Browse files
authored
Merge pull request #154 from michellaurent/master
Fixes #153
2 parents a82620b + c6a0ea8 commit e654eaf

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

routes/web.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44

55
$dripRoute = config('genealabs-laravel-caffeine.route', 'genealabs/laravel-caffeine/drip');
66

7-
Route::get($dripRoute, Drip::class.'@drip');
7+
Route::get($dripRoute, Drip::class.'@drip')->middleware('web');

src/Providers/Service.php

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,11 @@ class Service extends ServiceProvider
1010
{
1111
public function boot()
1212
{
13-
app('router')->group(app("router")->hasMiddlewareGroup('web')
14-
? ['middleware' => 'web']
15-
: [], function () {
16-
require __DIR__ . '/../../routes/web.php';
13+
$this->loadRoutesFrom(__DIR__.'/../../routes/web.php');
1714

18-
if (config("app.env") === 'internaltesting') {
19-
require __DIR__ . '/../../tests/routes/web.php';
20-
}
21-
});
15+
if (config("app.env") === 'internaltesting') {
16+
$this->loadRoutesFrom(__DIR__.'/../../tests/routes/web.php');
17+
}
2218

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

0 commit comments

Comments
 (0)