Skip to content

Latest commit

 

History

History
50 lines (33 loc) · 941 Bytes

File metadata and controls

50 lines (33 loc) · 941 Bytes

MaterializeCSS Laravel Pagination

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