Answer the question
In order to leave comments, you need to log in
How to keep links in an article on a Laravel site from getting 404 errors after changing the route or slug?
Greetings!
I'm building a Laravel site here, and the situation is this... There is a blog on the site, and articles in the blog. In the articles, in theory, there will be links to other articles on this site.
There are routes like
Route::get('/blog/{slug}', [
'uses' => '[email protected]',
'as' => 'blog.show'
]);
<a href="http://prophecy.local/blog/hallou" >мой анкор</a>
<a href="{{route('blog.show', ['post' => 'hallou'])}}">О сайте</a>
route('blog.show', ['slug' => \App\Post::slugFromId(12)])
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question