Back

Many-to-many with ID and relation, How would the model look?


I'm trying to build a database where an admin

Can create lists that have can have tasks, now the tricky part is, all users can set tasks as completed, but only for himself.

Here's my current scheme http://imgur.com/a/x6cwo

I'm trying to get the models working with the following

User.php

 public function blocks()  
{
    return $this->hasMany(Block::class, 'user_path_blocks');
}

Sign in to participate in this thread!



We'd like to thank these amazing companies for supporting us