yajra / laravel-datatables

jQuery DataTables API for Laravel
https://yajrabox.com/docs/laravel-datatables
MIT License
4.76k stars 858 forks source link

Sort and search case sensitive #612

Closed SGarridoDev closed 8 years ago

SGarridoDev commented 8 years ago

Hi guys!

I use Laravel 5 with your laravel-datatables repo. All works fine, congratulations!!

But when the datatable sort or search any data use case sensitive and first show words in uppercase and after words in lowercase.

Is there any solution for this?

Thanks in advance

yajra commented 8 years ago

Can you check your datatables.php config and check the ff:

    'search' => [
        'smart'            => true,
        'case_insensitive' => true,
        'use_wildcards'    => false,
    ],
umrtariq commented 6 years ago

Just create php file name datatables.php on config folder of laravel and paste below code. its working. Thanks

<?php

return [

    'search'          => [

        'smart'            => true,

        'case_insensitive' => true,

        'use_wildcards'    => false,
    ],

    'fractal'         => [
        'includes'   => 'include',

        'serializer' => 'League\Fractal\Serializer\DataArraySerializer',
    ],

    'script_template' => 'datatables::script',

    'index_column'    => 'DT_Row_Index',

    'namespace'       => [

        'base'  => 'DataTables',

        'model' => '',
    ],

    'pdf_generator'   => 'excel',

    'snappy'          => [

        'options'     => [
            'no-outline'    => true,
            'margin-left'   => '0',
            'margin-right'  => '0',
            'margin-top'    => '10mm',
            'margin-bottom' => '10mm',
        ],
        'orientation' => 'landscape',
    ],
];