modularsoftware /
genealogy
| 1 | <?php |
||
| 2 | |||
| 3 | namespace App\Tables\Builders; |
||
| 4 | |||
| 5 | use App\Citation; |
||
| 6 | use Illuminate\Database\Eloquent\Builder; |
||
| 7 | use LaravelEnso\Tables\Contracts\Table; |
||
| 8 | |||
| 9 | class CitationTable implements Table |
||
| 10 | { |
||
| 11 | protected const TemplatePath = __DIR__.'/../Templates/citations.json'; |
||
| 12 | |||
| 13 | public function query(): Builder |
||
| 14 | { |
||
| 15 | return Citation::select(\DB::raw(' |
||
|
0 ignored issues
–
show
Bug
Best Practice
introduced
by
Loading history...
|
|||
| 16 | citations.id as "dtRowId", citations.name as name, citations.description as description, citations.volume as volume, |
||
| 17 | citations.page as page, citations.confidence as confidence, citations.is_active as is_active, |
||
| 18 | citations.date as date, citations.created_at as created_at, sources.name as source |
||
| 19 | '))->join('sources', 'citations.source_id', '=', 'sources.id'); |
||
| 20 | } |
||
| 21 | |||
| 22 | public function templatePath(): string |
||
| 23 | { |
||
| 24 | return static::TemplatePath; |
||
| 25 | } |
||
| 26 | } |
||
| 27 |