laravel / framework

The Laravel Framework.
https://laravel.com
MIT License
32.42k stars 10.99k forks source link

onEachSide #51024

Closed ericthanhtung closed 6 months ago

ericthanhtung commented 6 months ago

Laravel Version

10.10

PHP Version

8.2.12

Database Driver & Version

No response

Description

I'm having problems with onEachSide. Please help me my code: image image

Screenshot from 2024-04-11 23-36-14

Steps To Reproduce

<?php

namespace App\Livewire;

use App\Models\Quiz; use Livewire\Component;

class SearchQuestion extends Component { public $key;

protected $queryString = ['key'];

public function render()
{
    $quizzes = Quiz::where('title', 'like', '%' . $this->key . '%')->orWhere('id', $this->key)->paginate(5);
    return view('livewire.search-question', compact('quizzes'));
}

}

@foreach($quizzes as $quiz)
@endforeach
{{ $quizzes->onEachSide(6)->withQueryString()->links() }}
crynobone commented 6 months ago

Hi there,

Thanks for reporting the problem you are encountering, but it looks like this is a question which may be better suited for a support channel. We only use this issue tracker for reporting bugs with the library itself. If you have a question on how to use functionality provided by this repository you can try one of the following channels:

However, this issue will not be locked and everyone is still free to discuss solutions to your problem!

Thanks.