You are describing a many-to-many relationship; so, you need a Task model and a User model, along with pivot table task_user (by convention) with only the user_id and task_id foreign keys - though we might need a separate column to track whether the user has completed the task. There is no need for the CompleteTask Pivot model (at least for now). On the related models:
Task model
public function users()
{
return $this->belongsToMany(User::class);
}
// User model
public function tasks()
{
return $this->belongsToMany(Task::class);
}
You can then assign users to a Task using the belongsToMany methods:
class TaskController extends BaseController
{
public function complete($id)
{
$task = Task::findOrFail($id);
$task->users()->attach(auth()->id()); // this ID doesn't make sense...
return Redirect::to('/tasks');
}
}