Laravel-datatables: Sort and search case sensitive

Created on 22 Jun 2016  路  2Comments  路  Source: yajra/laravel-datatables

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

documentation question

All 2 comments

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

    'search' => [
        'smart'            => true,
        'case_insensitive' => true,
        'use_wildcards'    => false,
    ],

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',
    ],
];
Was this page helpful?
0 / 5 - 0 ratings