Passed
Push — master ( acf2dc...3a8b1f )
by Curtis
12:39
created

CitationTable::query()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
3
namespace App\Tables\Builders;
4
5
use App\Citation;
6
use LaravelEnso\Tables\app\Services\Table;
7
8
class CitationTable extends Table
9
{
10
    protected $templatePath = __DIR__.'/../Templates/citations.json';
11
12
    public function query()
13
    {
14
        return Citation::selectRaw('
15
            citations.id as "dtRowId", citations.name as name, citations.description as description, citations.is_active as is_active, citations.date as date, citations.created_at as created_at, sources.name as source
16
        \'))->join(\'sources\', \'citations.source_id\', \'=\', \'sources.id\');
17
        ');
18
    }
19
}
20