fixed relationship

This commit is contained in:
Denis Duliçi 2022-03-02 12:29:37 +03:00
parent 3249e7b18d
commit 1207dc8d13
2 changed files with 11 additions and 1 deletions

View File

@ -28,4 +28,9 @@ class UserCompany extends Model
{
return $this->belongsTo('App\Models\Auth\User');
}
public function company()
{
return $this->belongsTo('App\Models\Common\Company');
}
}

View File

@ -15,7 +15,7 @@ class UserDashboard extends Model
*
* @var array
*/
protected $fillable = ['user_id', 'company_id'];
protected $fillable = ['user_id', 'dashboard_id'];
/**
* Indicates if the model should be timestamped.
@ -28,4 +28,9 @@ class UserDashboard extends Model
{
return $this->belongsTo('App\Models\Auth\User');
}
public function dashboard()
{
return $this->belongsTo('App\Models\Common\Dashboard');
}
}