#### Category : sorting

Actually I am fetching dates from my database and want to display minimum date first , how can I do that ?? original view and this is what I want like 2, 9 , 8 date format from min to max and so on view code @foreach($shedular_date as$key=>$value) <div> <div class="booking-date-box" data-booking-date="{{$key}}" data-booking-id="{{ $loop->index .. Read more I have got an array that looks like this: ^ IlluminateSupportCollection {#2057 ▼ #items: array:2 [▼ "pizza" => 2 "cookking vuurschaal palma" => 1 ] } does anyone know how to sort by value instead of keys in laravel? thanks! Sourc.. Read more I have got an array that looks like this: ^ IlluminateSupportCollection {#2057 ▼ #items: array:2 [▼ "pizza" => 2 "cookking vuurschaal palma" => 1 ] } does anyone know how to sort by value instead of keys in Laravel? Sourc.. Read more i want to use a function (@lang) inside another function (@sortablelink). @lang: changed localisation depending on previous user input @sortablelink: kysliks sortable columns (https://github.com/Kyslik/column-sortable) Like this: @foreach($COLUMNS_TASK as $column =>$val) <div class="th"> <a href=""><p class="justify-content-center text-center">@sortablelink($val, @lang(‘lang.’.$val))</p></a> </div> @endforeach When i run this code, i am getting this error: Error Call to undefined function ..

I am trying to filter the records from min to max. I have two nodes from where I want to filter one is min and other is max. Here is what i tried I have two values to compare $request->min &&$request->max . I don’t know what i am doing wrong. Here is my PHP ..

I want to order my all products by price. In Product table there is product_options column and inside of that column i have json data, something like this; {"price":390,"discounted_price":26,"quantity":168} I tried to orderBy product_options but its returnin by alphabetic so 17 comes after 1000. It looks like i should use collection functions for this but ..

How Can I Calculate Sum of below 02 arrays in php? I need key as same. This is the first and second array $array1 = [ 1 => 0 2 => 0 3 => 0 4 => 10 5 => 54 6 => 0 7 => 0 8 => 0 ];$array2 = [ 1 ..