skip to Main Content

I need to change the page name in my laravel project. I need a help

page name
**about ** to best-courier-company-in-uae

like this in the url.

about is a blade file with html inside.
can we change this page name without running the artisan?

i tried to change the name from web.php routing but its not changing.

`Route::redirect(‘/about’, ‘/best-courier-company-in-uae’, 301);

Route::get(‘/best-courier-company-in-uae’, function () {
return view(‘about’);
});`

2

Answers


  1. Chosen as BEST ANSWER

    I changed the page name url from routes cache into the new name and it worked. redirect from htaccess old url into new url. add redirect from routes file. enter image description here


  2. I assume that you mention the route /best-courier-company-in-uae is defined after the redirection, so put it before the redirect route

    It may be works, Thanks later

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search