axotion /
TaskManager
| 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
|
|||
| 19 | $this->attributes['user_id'] = auth()->id(); |
||
| 20 | } |
||
| 21 | } |
||
| 22 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.