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

CitationTable   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 7
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 3
c 1
b 0
f 0
dl 0
loc 7
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A query() 0 3 1
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