Clients file update
This commit is contained in:
miroman-afk
2021-11-16 15:43:14 +03:00
parent 13a115ba0d
commit 3c8a6b2736
5 changed files with 11 additions and 5 deletions

View File

@@ -11,6 +11,6 @@ class Client extends Model {
* Get clients phone.
*/
public function clientPhone() {
return $this->hasOne('App\Component\Models\ClientsPhone', 'client_guid', 'user_code');
return $this->belongsTo('App\Component\Models\ClientsPhone', 'user_code', 'client_guid');
}
}

View File

@@ -11,6 +11,6 @@ class ClientsPhone extends Model {
* Get clients.
*/
public function client() {
return $this->hasOne('App\Component\Models\Clients', 'user_code', 'client_guid');
return $this->belongsTo('App\Component\Models\Clients', 'user_code', 'client_guid');
}
}