mehrdad70's avatar

pagination dynamic in laravel

How can I make this

    public function index()
    {
        $articles = Article::paginate();
        return view('admin.articles.index' , compact('articles'));
    }
            <div aria-label="Page navigation example">
              <ul class="pagination mb-0">
                <li class="page-item"><a class="page-link" href="#">Previous</a></li>
                <li class="page-item"><a class="page-link" href="#">1</a></li>
                <li class="page-item"><a class="page-link" href="#">2</a></li>
                <li class="page-item"><a class="page-link" href="#">3</a></li>
                <li class="page-item"><a class="page-link" href="#">Next</a></li>
              </ul>
            </div>
0 likes
4 replies
mehrdad70's avatar

With this method, the pagination appearance of the front end section becomes the appearance of Bootstrap, but I want the pagination to be personalized.

jlrdw's avatar

You can do a pagination template anyway you like, an example https://laracasts.com/discuss/channels/guides/paginator-another-episode

Just design your custom template.

With this method, the pagination appearance of the front end section becomes the appearance of Bootstrap, but I want the pagination to be personalized.

You can apply any CSS you want. So I guess I'm not understanding the question.

Please or to participate in this conversation.