tiagof2/materializecss-laravel-pagination

v1.0.3 2021-03-04 23:43 UTC

This package is auto-updated.

Last update: 2024-10-24 08:56:41 UTC


README

Laravel Pagination for https://materializecss.com

On Composer packagist:

https://packagist.org/packages/tiagof2/materializecss-laravel-pagination

Installation

composer require tiagof2/materializecss-laravel-pagination

Usage

1 - Send paginated data to the view

//MyController.php
$contacts = Agenda::paginate(10);

return view('agenda.index', [
    'contacts' => $contacts,
]);

2 - In your view

// agenda/index.blade.php
{!! with(new TiagoF2\MaterializePagination\MaterializePagination($contacts))->render() !!}

// With custom color
{!! with(new TiagoF2\MaterializePagination\MaterializePagination($contacts))->setColor('indigo lighten-2')->render() !!}
MaterializeCSS Colors:

https://materializecss.com/color.html

Demo Print

Inspired by https://github.com/PhillippOhlandt/materializecss-laravel-pagination