This commit is contained in:
foobar
2022-08-21 21:39:06 +02:00
commit 27c1969aaa
7354 changed files with 897064 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
<?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');
}
}