Completed
Push — master ( e98ec0...b5ecb4 )
by Arjay
07:49
created

helper.php ➔ config_path()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 2
nc 2
nop 1
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
use Yajra\DataTables\DataTables;
4
5
if (!function_exists('datatables')) {
6
    /**
7
     * Helper to make a new DataTable instance from source.
8
     * Or return a new factory if source is not set.
9
     *
10
     * @param mixed $source
11
     * @return \Yajra\DataTables\DataTableAbstract|\Yajra\DataTables\DataTables
12
     */
13
    function datatables($source = null)
14
    {
15
        if ($source) {
16
            return DataTables::make($source);
17
        }
18
19
        return new DataTables;
20
    }
21
}
22