Files
StocksNew/vendor/spatie/laravel-ignition/src/Solutions/SolutionProviders/MissingAppKeySolutionProvider.php
Sampanna Rimal 53c0140f58 first commit
2024-08-27 17:48:06 +05:45

26 lines
682 B
PHP

<?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()];
}
}