Home > Software design >  Remove Route Name in url
Remove Route Name in url

Time:02-10

Every One Please Help for laravel8 route my route url is http://localhost:8000/page/faq

I need url is http://localhost:8000/faq

Remove page in url in laravel8 how is possible

CodePudding user response:

I am not that into Laravel, so correct me if I am wrong. But I would change the directory of the whole project to /page/ (Maybe in the config file, ddev or xampp /mammp). So your path would be http://localhost:8000/faq

CodePudding user response:

Define your url using route, change YourController with your actual controller

use App\Http\Controllers\YourController;
 
Route::get('/faq', [YourController::class, 'index']);

you can see here for reference https://laravel.com/docs/8.x/routing#basic-routing

  • Related