V
V
Vitaly2018-03-21 15:41:48
Laravel
Vitaly, 2018-03-21 15:41:48

Sorting output in Laravel 5.6?

There is a table Zeekee%2BQuotes%2B2%2B-%2BGoogle%2BChrom
All this stuff is displayed

<tbody id="quote-section">

                    @forelse(old('quote_sections', []) as $index => $data)

                        @include('admin.quotes.quote_sections_row', [
                            'index' => $index
                        ])
                    @empty
                        @foreach($quote->quote_sections as $item)
                            @include('admin.quotes.quote_sections_row', [
                                'index' => 'id-' . $item->id,
                                'field' => $item
                            ])
                        @endforeach
                    @endforelse
                </tbody>

how do i sort records by 'Sort order' field

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Oleg, 2018-03-21
@kat-vetal

Perform sorting at the stage of obtaining data from the database.
MySQL
Documentation Eloquent Documentation

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question