ka4ivan/laravel-view-sortable
Sort Link and URL for Laravel Framework
Installation
- Require this package with composer
composer require ka4ivan/laravel-view-sortable
- Publish package resource:
php artisan vendor:publish --provider="Ka4ivan\ViewSortable\ServiceProvider"
Usage
Examples usage
{!! \Sort::getSortLink('status', 'Status') !!}
// <a class="lte-sort-link" href="http://test.test?sort=status&order=asc" style="position: relative">Status </a>
{!! \Sort::getSortLink(sort: 'city', text: 'City', order: 'desc', class: 'text-black', query: ['locale' => 'uk']) !!}
// <a class="text-black" href="http://test.test?sort=city&order=desc&locale=uk" style="position: relative">City </a>
{!! (new \Ka4ivan\ViewSortable\Support\Sort)->getSortLink('phone', 'Phone') !!}
// <a class="lte-sort-link" href="http://test.test?sort=phone&order=asc" style="position: relative">Phone </a>
{!! \Sort::getSortUrl('status', 'asc') !!}
// http://test.test?sort=status&order=asc
{!! \Sort::getSortUrl('name', 'asc', ['locale' => 'uk']) !!}
// http://test.test?sort=name&order=asc&locale=uk
{!! \Sort::getNextOrder() !!}
// asc|desc
Related Packages
whitecube/laravel-links
Store & resolve internal URLs without having to worry about route, slug or domai...
612
2
nahid/linkify
Converts URLs and email addresses in text into HTML links its extended from Misd...
149,985
11
linkeys/signed-url
Enhanced signed URLs for Laravel, including attaching data, click limits and exp...
72,541
22
Version History
| Version | Released | PHP | Laravel | License |
|---|---|---|---|---|
| 1.1.3 | ^8.0.2 | ^9.0| | MIT | |
| 1.1.2 | ^8.0.2 | ^9.0| | MIT | |
| 1.1.1 | ^8.0.2 | ^9.0| | MIT | |
| 1.1.0 | ^8.0.2 | ^9.0| | MIT | |
| 1.0.0 | ^8.0.2 | ^9.0| | MIT | |
| 0.0.1 | ^8.0.2 | ^9.0| | MIT |