PHP code example of ka4ivan / laravel-view-sortable

1. Go to this page and download the library: Download ka4ivan/laravel-view-sortable library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

ka4ivan / laravel-view-sortable example snippets


{!! \Sort::getSortLink('status', 'Status') !!}
// <a class="lte-sort-link" href="http://test.test?sort=status&amp;order=asc" style="position: relative">Status </a>

{!! \Sort::getSortLink(sort: 'city', text: 'City', order: 'desc', class: 'text-black') !!}
// <a class="text-black" href="http://test.test?sort=city&amp;order=desc" style="position: relative">City </a>

{!! (new \Ka4ivan\ViewSortable\Support\Sort)->getSortLink('phone', 'Phone') !!}
// <a class="lte-sort-link" href="http://test.test?sort=phone&amp;order=asc" style="position: relative">Phone </a>
shell
php artisan vendor:publish --provider="Ka4ivan\ViewSortable\ServiceProvider"