Issues (533)

src/Models/Source.php (1 issue)

Labels
Severity
1
<?php
2
3
namespace FamilyTree365\LaravelGedcom\Models;
4
5
use Illuminate\Database\Eloquent\Model;
0 ignored issues
show
The type Illuminate\Database\Eloquent\Model was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
6
7
class Source extends Model
8
{
9
    /**
10
     * The "type" of the auto-incrementing ID.
11
     *
12
     * @var string
13
     */
14
    protected $keyType = 'integer';
15
16
    protected $fillable = ['sour', 'titl', 'auth', 'data', 'text', 'publ', 'abbr', 'name', 'description', 'repository_id', 'author_id', 'publication_id', 'type_id', 'is_active', 'group', 'gid', 'quay', 'page'];
17
18
    protected $attributes = ['is_active' => false];
19
20
    protected $casts = ['is_active' => 'boolean'];
21
22
    public function repositories()
23
    {
24
        return $this->belongsTo(Repository::class);
25
    }
26
27
    public function citations()
28
    {
29
        return $this->hasMany(Citation::class);
30
    }
31
32
    public function getCitationListAttribute()
33
    {
34
        return $this->citations()->pluck('citation.id');
35
    }
36
}
37