Issues (41)

app/Tasks.php (1 issue)

1
<?php
2
3
namespace TaskManager;
4
5
use Illuminate\Database\Eloquent\Model;
6
7
class Tasks extends Model
8
{
9
    protected $fillable = [ 'task', 'complete','user_id'];
10
11
    public function user()
12
    {
13
       return $this->belongsTo('\TaskManager\User', 'user_id');
14
    }
15
    public function setCompleteAttribute($value){
16
        $this->attributes['complete'] = $value ?? false;
17
    }
18
    public function setUserIdAttribute($value){
0 ignored issues
show
The parameter $value is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

18
    public function setUserIdAttribute(/** @scrutinizer ignore-unused */ $value){

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
19
        $this->attributes['user_id'] = auth()->id();
20
    }
21
}
22