File: D:/HostingSpaces/SBogers10/plateau.komma.nl/app/Exceptions/Solutions/ResetDatabase.php
<?php declare(strict_types=1);
namespace App\Exceptions\Solutions;
use Facade\IgnitionContracts\RunnableSolution;
use Illuminate\Support\Facades\Artisan;
use Illuminate\Support\Facades\Cookie;
class ResetDatabase implements RunnableSolution
{
public function getSolutionTitle(): string
{
return 'Reset your database';
}
public function getSolutionDescription(): string
{
return 'Solve this problem by refreshing and reseeding your database. All your data will be lost!';
}
public function getDocumentationLinks(): array
{
return [
];
}
public function getSolutionActionDescription(): string
{
return 'We can try to refresh the database and redirect you to the base url (/)';
}
public function getRunButtonText(): string
{
return 'Refresh database';
}
public function run(array $parameters = [])
{
Artisan::call('migrate:fresh');
Artisan::call('kms:seed');
Artisan::call('db:seed');
}
public function getRunParameters(): array
{
return [];
}
}