init
This commit is contained in:
22
vendor/spatie/laravel-ignition/src/Http/Middleware/RunnableSolutionsEnabled.php
vendored
Normal file
22
vendor/spatie/laravel-ignition/src/Http/Middleware/RunnableSolutionsEnabled.php
vendored
Normal 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');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user