The GET method is not supported for this route. Supported methods: HEAD.
This like the first time i face such a problem, I use Laravel for quite time , I faced this problem when Upgraded to Laravel 8, I've created new project did my work as usual uploaded to shared hosting then i got this error
The GET method is not supported for this route. Supported methods: HEAD.
this error appears only in root URL "/" any other routes works fine.
here is an example
https://osama.app/masarat
show an error but this URL
https://osama.app/masarat/index , works as required
so what is wrong with "/" URL
route file web.php
<?php
use Illuminate\Support\Facades\Route;
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/
Route::get('/', [App\Http\Controllers\PagesController::class, 'index'])->name('index');
Route::get('/index', [App\Http\Controllers\PagesController::class, 'index'])->name('index2');
Auth::routes();
Route::get('/home', [App\Http\Controllers\HomeController::class, 'index'])->name('home');
am sorry I forgot to attach route file with the post
<?php
use Illuminate\Support\Facades\Route;
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/
Route::get('/', [App\Http\Controllers\PagesController::class, 'index'])->name('index');
Route::get('/index', [App\Http\Controllers\PagesController::class, 'index'])->name('index2');
Auth::routes();
Route::get('/home', [App\Http\Controllers\HomeController::class, 'index'])->name('home');
I think this maybe kinda true , because i have another Laravel project on root of my public_html folder so I think they are somehow interfere with it, i will try to make it as subdomain and see if this still happen