• Categories
    • PHP
    • phpMyAdmin
    • PHPMailer
    • FFMpeg
    • PHPEXcel
    • PHPDoc
    • PHPUnit
    • CakePHP
    • CakePHP 2.0
    • Cake PHP 2.1
    • CakePHP Model
    • Facebook PHP SDK
    • composer-php
    • PHP 7
    • PHP GD
    All Categories
  • About

Laravel 5: Is there a non-case sensitive way to sort a collection by an attribute?

phplaravelsortingeloquent


PHP Snippet 1:

$collection->sort(function($a, $b){
    return strtolower($a) <=> strtolower($b);
});

Related Snippets

How to get median and quartiles/percentiles of an array in JavaScript (or PHP)?

Dropdown with current value from Mysql

how to upload binary image to sql server using php laravel

Laravel multi auth - Authentication user provider [] is not defined

HTML + PHP + PHPMAILER

sqlsrv_num_rows() expects parameter 1 to be resource, boolean given

Laravel Carbon throws error The format separator does not match

Laravel database insert with combining array and string

Laravel Mix Uncaught ReferenceError: $ is not defined

PHP: remove filename from path

Adding custom body class to the custom archive pages

Issue with laravel eloquent model property

Check If array is null or not in php

Get sum of arrays inside array

Is there a way to use the same parameter into multiple place in the same query with Eloquent? [duplicate]

About Contact Privacy policy Terms and conditions