- Save the
helpers.phpfile in yourappdirectory - Edit your
composer.jsonmanifest file to auloload this file:
"autoload": {
"files": [
"app/helpers.php"
],
// ...
- Execute the
composer dumpcommand to update the autoloaded files - Execute the
php artisan vendor:publish --tag=laravel-paginationcommand to publish the pagination views - Save the
custom.blade.phpfile in theresources/views/vendor/paginationdirectory - Use it like that:
User::paginate(10)->links('pagination::custom')