macsidigital/laravel-resultable

This package is abandoned and no longer maintained. No replacement package was suggested.

A little package to add amount of results to searches

1.0.9 2020-06-18 15:23 UTC

This package is auto-updated.

Last update: 2021-04-23 12:33:54 UTC


README

Latest Version on Packagist Build Status StyleCI Scrutinizer Code Quality Total Downloads

A simple Laravel package to set the amount of results returned for pagination

Installation

You can install the package via composer:

composer require macsidigital/laravel-resultable

The service provider should automatically register for For Laravel > 5.4.

For Laravel < 5.5, open config/app.php and, within the providers array, append:

MacsiDigital\Resultavle\Providers\ResultavleServiceProvider::class

Usage

Set the various options in the config like so

return [
	'no_results' => [
		'20',
		'50',
		'100',
		'250',
		'500',
		'1000'
	]
];

Then loop through and use the blade helper to create the links like so, best used in a dropdown

@foreach(config('resultable.no_results') as $result_amount)
	<a href="@resultableurl()&results={{$result_amount}}">{{$result_amount}}</a>
@endforeach

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email colin@macsi.co.uk instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.