Answers for "laravel sortby asc"

PHP
5

order By Asc in laravbel

->orderBy('id', 'DESC');
Posted by: Guest on October-05-2020
0

sortbydesc on a collection laravel

$response = $f_games->merge($s_games)->sortByDesc('id')->values();
Posted by: Guest on June-20-2021
0

array_sort in laravel

$array = [
    ['name' => 'Desk'],
    ['name' => 'Chair'],
];

$array = array_values(array_sort($array, function ($value) {
    return $value['name'];
}));

/*
    [
        ['name' => 'Chai
Posted by: Guest on June-12-2021

Browse Popular Code Answers by Language