Skip to content

Commit

Permalink
bug(#11): conditionally include the helium route file
Browse files Browse the repository at this point in the history
  • Loading branch information
vorban committed Jan 21, 2025
1 parent 8726ad7 commit bbcd3d9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion routes/_helium.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,9 @@
->prefix(config('helium.route-prefix'))
->middleware('web')
->group(function () {
include_once base_path('routes/helium.php');
// perf(val): this serializes correctly with `artisan route:cache`
// so the check is executed once.
if (file_exists(base_path('routes/helium.php'))) {
include_once base_path('routes/helium.php');
}
});

0 comments on commit bbcd3d9

Please sign in to comment.