HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
File: D:/HostingSpaces/debout/debout.nl/app/Exceptions/Solutions/AppLanguageUnavailableInCurrentSite.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 AppLanguageUnavailableInCurrentSite implements RunnableSolution
{

    public function getSolutionTitle(): string
    {
        return 'Clear your language cookie';
    }

    public function getSolutionDescription(): string
    {
        return 'Solve this problem by clearing your language cookie, redirect to base url.'.
            'The language cookie and / or url suggested to put the app in a certain language, but that language was not part of the current site. ' .
            'By clearing your language cookie the app should reset itself to an available language on the next request. ' .
            'By sending you to the base url (/) you make sure that you don\'t tell the app to use specific language, referenced in the url. Breaking the app again. ' .
            'This error most likely occurs when you are developing in a different project, and that different project did have an app language, unavailable in this project.';
    }

    public function getDocumentationLinks(): array
    {
        return [
        ];
    }

    public function getSolutionActionDescription(): string
    {
        return 'We can try to solve this exception by clearing your language cookie, and redirecting you to the base url (/).';
    }

    public function getRunButtonText(): string
    {
        return 'Clear language cookie and redirect.';
    }

    public function run(array $parameters = [])
    {
        Cookie::forget('language');
    }

    public function getRunParameters(): array
    {
        return [];
    }
}