Search code examples
laravelrouteslaravel-jetstream

Laravel 8 error route | The GET method is not supported for this route


Laravel V 8 Jetstream. This problem appeared with me after I uploaded and published the project on shared hosting Error message

Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException The GET method is not supported for this route. Supported methods: HEAD.

enter image description here

Route::get('/', function () {
    return view('welcome');
});

route code

Route::middleware(['auth:sanctum', 'verified'])->group(function () {
    Route::get('/dashboard',function () {
        return view('dashboard');
    })->name('dashboard');;

    Route::get('/upload', function () {
        return view('uploadpdf');
    })->name('upload'); 

});

Solution

  • If you encounter this problem, always check the settings in your .env and config files The error was found in config.php - /bootstrap/cache/config.php. I did not configure the location settings like APP_URL and the paths of some directories were pointing to my computer Good luck everyone Greetings from the Dzsecurity company team for helping to find a solution