vendredi 28 septembre 2018

How to get all records except the first 5 records after sorting based on a specific column

I have 18 records that are sorted based on specific column.

the first 5 records must be shown at first, and when click the specific button another records must be shown.

how can I do it ? I should use javascript?
it is my query...

           public function theMostImportant()
        {
// return  CategoryActivity::all()->sortByDesc("priority")->take(5);
       return  CategoryActivity::all()->sortByDesc("priority");
    }

in my view , my code is like this:

          @foreach($priorityProjectCategory as $importantCategory)

                                --}}

                                <li><a href="#" data-filter="."
                                       class="current"><sup>

                                        </sup></a></li>
                            @endforeach



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2OXnXq9
via IFTTT

Aucun commentaire:

Enregistrer un commentaire