mirror of
https://github.com/10h30/Test-Eloquent-Relationships.git
synced 2026-07-18 06:03:35 +09:00
Task 2 - no relationship
This commit is contained in:
@@ -10,4 +10,9 @@ class Task extends Model
|
||||
use HasFactory;
|
||||
|
||||
protected $fillable = ['name', 'users_id'];
|
||||
|
||||
public function user()
|
||||
{
|
||||
return $this->belongsTo(User::class, 'users_id');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user