From 983789a9f5e6906cb0e7344f6efcf52b0335f1c7 Mon Sep 17 00:00:00 2001 From: Alex Date: Thu, 16 Feb 2017 18:00:59 +0200 Subject: [PATCH] registration --- app/library/App/Model/User.php | 8 ++++++++ 1 file changed, 8 insertions(+), 0 deletions(-) diff --git a/app/library/App/Model/User.php b/app/library/App/Model/User.php index fa69d88..29d9d80 100755 --- a/app/library/App/Model/User.php +++ b/app/library/App/Model/User.php @@ -24,4 +24,12 @@ class User extends \App\Mvc\DateTrackingModel 'password' => 'password' ]; } + + public function initialize() + { + $this->hasMany('id', Project::class, 'user_id', [ + 'alias' => 'Projects', + ]); + } + } -- libgit2 0.21.4