tiagof2 / materializecss-laravel-pagination
MaterializeCSS Laravel Pagination
v1.0.3
2021-03-04 23:43 UTC
Requires
- php: ^7.2|^8.0
- ext-json: *
- illuminate/contracts: ^7.0|^8.0
- illuminate/pagination: ^7.0|^8.0
- illuminate/support: ^7.0|^8.0
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