Support the ongoing development of Laravel.io →
posted 10 years ago
Views Blade
Last updated 2 years ago.
0

Has no one a Idea?

Last updated 2 years ago.
0

Add this functions to SemanticUiPresenter class. I use FontAwesome to display the prev/next arrow.

    public function getPrevious($text = '<i class="fa fa-arrow-left"></i>')
    {
        if ($this->currentPage <= 1)
        {
            return $this->getDisabledTextWrapper($text);
        }

        $url = $this->paginator->getUrl($this->currentPage - 1);

        return $this->getPageLinkWrapper($url, $text, 'prev');
    } 

    public function getNext($text = '<i class="fa fa-arrow-right"></i>')
    {
        if ($this->currentPage >= $this->lastPage)
        {
            return $this->getDisabledTextWrapper($text);
        }

        $url = $this->paginator->getUrl($this->currentPage + 1);

        return $this->getPageLinkWrapper($url, $text, 'next');
    }
}
0

Sign in to participate in this thread!

Eventy

Your banner here too?

surtic86 surtic86 Joined 6 Mar 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.