Issues (364)

app/Tables/Builders/PlaceTable.php (1 issue)

1
<?php
2
3
namespace App\Tables\Builders;
4
5
use App\Models\Place;
6
use Illuminate\Database\Eloquent\Builder;
7
use LaravelEnso\Tables\Contracts\Table;
8
9
class PlaceTable implements Table
10
{
11
    protected const TemplatePath = __DIR__.'/../Templates/places.json';
12
13
    public function query(): Builder
14
    {
15
        return Place::selectRaw('
0 ignored issues
show
Bug Best Practice introduced by
The expression return App\Models\Place:... places.date ') could return the type Illuminate\Database\Eloq...gHasThroughRelationship which is incompatible with the type-hinted return Illuminate\Database\Eloquent\Builder. Consider adding an additional type-check to rule them out.
Loading history...
16
            places.id, places.title, places.description, places.date
17
        ');
18
    }
19
20
    public function templatePath(): string
21
    {
22
        return static::TemplatePath;
23
    }
24
}
25