first commit
This commit is contained in:
25
vendor/spatie/laravel-ignition/src/Solutions/SolutionProviders/MissingAppKeySolutionProvider.php
vendored
Normal file
25
vendor/spatie/laravel-ignition/src/Solutions/SolutionProviders/MissingAppKeySolutionProvider.php
vendored
Normal file
@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
namespace Spatie\LaravelIgnition\Solutions\SolutionProviders;
|
||||
|
||||
use RuntimeException;
|
||||
use Spatie\Ignition\Contracts\HasSolutionsForThrowable;
|
||||
use Spatie\LaravelIgnition\Solutions\GenerateAppKeySolution;
|
||||
use Throwable;
|
||||
|
||||
class MissingAppKeySolutionProvider implements HasSolutionsForThrowable
|
||||
{
|
||||
public function canSolve(Throwable $throwable): bool
|
||||
{
|
||||
if (! $throwable instanceof RuntimeException) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return $throwable->getMessage() === 'No application encryption key has been specified.';
|
||||
}
|
||||
|
||||
public function getSolutions(Throwable $throwable): array
|
||||
{
|
||||
return [new GenerateAppKeySolution()];
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user