1 | <?php |
||||
2 | |||||
3 | namespace jeremykenedy\LaravelBlocker\App\Models; |
||||
4 | |||||
5 | use Illuminate\Database\Eloquent\Model; |
||||
0 ignored issues
–
show
|
|||||
6 | use Illuminate\Database\Eloquent\SoftDeletes; |
||||
0 ignored issues
–
show
The type
Illuminate\Database\Eloquent\SoftDeletes 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. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths ![]() |
|||||
7 | |||||
8 | class BlockedItem extends Model |
||||
9 | { |
||||
10 | use SoftDeletes; |
||||
11 | |||||
12 | /** |
||||
13 | * The table associated with the model. |
||||
14 | * |
||||
15 | * @var string |
||||
16 | */ |
||||
17 | protected $table; |
||||
18 | |||||
19 | /** |
||||
20 | * The connection name for the model. |
||||
21 | * |
||||
22 | * @var string |
||||
23 | */ |
||||
24 | protected $connection; |
||||
25 | |||||
26 | /** |
||||
27 | * Indicates if the model should be timestamped. |
||||
28 | * |
||||
29 | * @var bool |
||||
30 | */ |
||||
31 | public $timestamps = true; |
||||
32 | |||||
33 | /** |
||||
34 | * The attributes that are not mass assignable. |
||||
35 | * |
||||
36 | * @var array |
||||
37 | */ |
||||
38 | protected $guarded = [ |
||||
39 | 'id', |
||||
40 | ]; |
||||
41 | |||||
42 | /** |
||||
43 | * The attributes that should be mutated to dates. |
||||
44 | * |
||||
45 | * @var array |
||||
46 | */ |
||||
47 | protected $dates = [ |
||||
48 | 'created_at', |
||||
49 | 'updated_at', |
||||
50 | 'deleted_at', |
||||
51 | ]; |
||||
52 | |||||
53 | /** |
||||
54 | * Fillable fields. |
||||
55 | * |
||||
56 | * @var array |
||||
57 | */ |
||||
58 | protected $fillable = [ |
||||
59 | 'typeId', |
||||
60 | 'value', |
||||
61 | 'note', |
||||
62 | 'userId', |
||||
63 | ]; |
||||
64 | |||||
65 | protected $casts = [ |
||||
66 | 'typeId' => 'integer', |
||||
67 | 'value' => 'string', |
||||
68 | 'note' => 'string', |
||||
69 | 'userId' => 'integer', |
||||
70 | ]; |
||||
71 | |||||
72 | /** |
||||
73 | * Create a new instance to set the table and connection. |
||||
74 | * |
||||
75 | * @return void |
||||
76 | */ |
||||
77 | public function __construct($attributes = []) |
||||
78 | { |
||||
79 | parent::__construct($attributes); |
||||
80 | $this->connection = config('laravelblocker.blockerDatabaseConnection'); |
||||
0 ignored issues
–
show
The function
config was not found. Maybe you did not declare it correctly or list all dependencies?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||
81 | $this->table = config('laravelblocker.blockerDatabaseTable'); |
||||
82 | } |
||||
83 | |||||
84 | /** |
||||
85 | * Get the database connection. |
||||
86 | */ |
||||
87 | public function getConnectionName() |
||||
88 | { |
||||
89 | return $this->connection; |
||||
90 | } |
||||
91 | |||||
92 | /** |
||||
93 | * Get the database table. |
||||
94 | */ |
||||
95 | public function getTableName() |
||||
96 | { |
||||
97 | return $this->table; |
||||
98 | } |
||||
99 | |||||
100 | /** |
||||
101 | * The one-to-one relationship between pages and tags. |
||||
102 | * |
||||
103 | * @return hasOne |
||||
0 ignored issues
–
show
The type
jeremykenedy\LaravelBlocker\App\Models\hasOne 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. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths ![]() |
|||||
104 | */ |
||||
105 | public function blockedType() |
||||
106 | { |
||||
107 | return $this->belongsTo(BlockedType::class, 'typeId'); |
||||
108 | } |
||||
109 | } |
||||
110 |
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:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths