Welcome Guest, Not a member yet? Register   Sign In
Entities and relationship
#6

Thank you @MGatner for your work.
I'm trying to use it but i get "Call to undefined method App\Models\TaskModel::with" in controller at line
$tasks = $this->taskModel->with('tags')->findAll();

I understand TaskModel does not extend the right model because i have coded :
use CodeIgniter\Model;
AND
use \Tatter\Relations\Traits\ModelTrait;
BUT :
class TaskModel extends Model

How should i code it to extend your "Tatter\Model" ?

Tables involved are tasks, tags and tasks_tags

Help would be highly appreciated

Thanks
Reply


Messages In This Thread
Entities and relationship - by Skem - 10-14-2021, 01:42 AM
RE: Entities and relationship - by includebeer - 10-16-2021, 07:09 AM
RE: Entities and relationship - by MGatner - 10-23-2021, 05:04 AM
RE: Entities and relationship - by mlurie - 10-26-2021, 09:09 AM
RE: Entities and relationship - by manager - 10-31-2021, 09:44 PM
RE: Entities and relationship - by foxbille - 12-18-2021, 10:14 AM
RE: Entities and relationship - by stopz - 12-20-2021, 02:33 PM
RE: Entities and relationship - by groovebird - 07-05-2022, 11:53 PM
RE: Entities and relationship - by kilishan - 07-06-2022, 06:33 AM



Theme © iAndrew 2016 - Forum software by © MyBB