Pages Redirects to First Page Created

Junker versions affected

v1.2 and older.

Cause

Bug in App\Models\Page.php.

Fix

Remove ->first() from App\Models\Page, line 47.

Fix instructions

Open app/Models/Page.php file and on line 47 remove ->first(). Final code should look like this:

return $query->whereHas('translations', function ($query) use ($slug) {
    $query->where('slug', $slug);
});

Still need help? Contact Us Contact Us