Files
wonderful-weather/vendor/spatie/laravel-ignition/src/Http/Middleware/RunnableSolutionsEnabled.php
foobar 27c1969aaa init
2022-08-21 21:39:06 +02:00

23 lines
424 B
PHP

<?php
namespace Spatie\LaravelIgnition\Http\Middleware;
use Closure;
class RunnableSolutionsEnabled
{
public function handle($request, Closure $next)
{
if (! $this->ignitionEnabled()) {
abort(404);
}
return $next($request);
}
protected function ignitionEnabled(): bool
{
return config('ignition.enable_runnable_solutions') ?? config('app.debug');
}
}