• 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

Invalid value in field "itemtype" in Google Search Console

PHP array stringify

How to KeyBy where multiple items have the same key

Problems getting instance of UploadedFile in Yii2

How to delete old images from public folder on update using Laravel

I need to link Google Sheet with my Laravel

How can I solve "laravel/horizon v1.1.0 requires ext-pcntl * -> the requested PHP extension pcntl is missing from your system"?

Laravel get user data with profile

Prevent blank space in pdf pages (DomPdf)

how to make my own auto increment in php?

How to programmatically find public properties of a class from inside one of it's methods

Fatal error: Uncaught Error: Call to undefined method mysqli_stmt::fetch_assoc() [duplicate]

SQLSTATE[HY000]: General error: 1 table posts has no column named *

OctoberCMS / Anonymous Global Scope

User pool client {id}does not exist

About Contact Privacy policy Terms and conditions