• 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 submit the custom form data in database in WordPress without plugin using ajax?

how to upload binary image to sql server using php laravel

Form repeater send wrong data with last element in Laravel

laravel and phpunit: could not find driver (SQL: PRAGMA foreign_keys = ON;)

Coinpayments create_transaction "ERROR: Invalid command!"

Webscraping Symfony/Panther: Can't get HTML

How to to send mail using gmail in Laravel?

mysql_result is defined but mysql_free_result warns it expected a resource

RabbitMQ PRECONDITION_FAILED - unknown delivery tag

Get all WooCommerce products within own plugin

Get Header Authorization value of a login api (sent with username and password in json body) using php curl

Cache clear probem in Larave

Failing validation doesn't stop code execution in livewire component

Add custom text under order details on WooCommerce My account view order pages

Explain how this array transposing and flattening function works

About Contact Privacy policy Terms and conditions