Y
Y
Yuri Smith2018-04-17 20:01:01
Laravel
Yuri Smith, 2018-04-17 20:01:01

Why is the link to the last item missing in Laravel 5 pagination?

Hello.
Changed the nesting level of entries from site.ru/category/cat-name/article-name/ to site.ru/article-name/
Corrected the receipt of categories in horseradish crumbs, since earlier they were pulled through the url, now through the relationship in the database entries to the heading .
Everything was displayed normally, but the link to the last category in the new posts (where the first level of nesting) disappeared.
In the article, breadcrumbs are displayed like this:

Breadcrumbs::register('article', function($breadcrumbs)
{
    $request = Request::getRequestUri();
    $breadcrumbs->parent('cat');
});

If you add the name of the record there:
$breadcrumbs->push($title);
Then the link starts working, and the name of the record is added accordingly, without a link.
But in old posts, the title of the post becomes a link to the main one.
What could be wrong?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question