• 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

Script @php artisan package:discover handling the post-autoload-dump event returned with error code 255

Laravel unique validation on multiple columns

WHM Enabling mod_rewrite

Laravel - Implicit route model binding with soft deleted data

XSS attack still works despite htmlspecialchars() doing its work

I can't delete my image when it is liked because of the foreign key in mysql

Laravel UUID generation

Form repeater send wrong data with last element in Laravel

Unable to create lockable file - Laravel 8 & PHP 8

phpunit - mockbuilder - set mock object internal property

array_map triple dimensional array [duplicate]

Laravel Sanctum CSRF not authenticating

Xdebug in Laravel is not working with VSCode

laravel 5.6 bulk inserting json data

Ajax GET request fails in laravel 8

About Contact Privacy policy Terms and conditions