• 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 create laravel storage symbolic link for production or sub domain system?

How to set time with DateTime modify?

How do I refresh a DIV content?

Custom post type single page not working

Extract string between first whitespace and last whitespace in php

Laravel Excel::store file empty after stored

Dynamic dropdown Ajax PHP request

How can I pass the list to the component variable in Laravel?

Sentry on Symfony: how to exclude `NotFoundHttpException`

how to identify the web server name of remote host

Laravel Displaying image from database

getting error while enter Command => php artisan route:list

Get sum of arrays inside array

PHP and WebView - Cookie doesn't are the same

Form Validation and Submission to database

About Contact Privacy policy Terms and conditions