• 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

Laravel lang slug in url

PHP sort array of objects by two properties

SilverStripe unable to populate multiple member Childs

enroll_table three field fetch to payment form to create payment field in laravel 5.5

Smarty: undefined extension class 'Smarty_Internal_Method_Get_Template_Vars'

Target Laravelista is not instantiable

Image upload not working through ajax Laravel

Multiple order by in WooCommerce

Eloquent insert id with sequence next value

Laravel: Why is my variable not being set while it's in the construct function of the controller?

php: command not found Command PhaseScriptExecution failed with a nonzero exit code

XDebug not working in VScode for php debugging

How do I loop through an MS SQL database with VB.NET?

Vimeo API: how to save a vimeo into a subfolder?

What is my SQL missing?

About Contact Privacy policy Terms and conditions