added dashboards relationship to UserDashboard model

This commit is contained in:
Cihan Şentürk 2023-08-14 14:11:30 +03:00 committed by GitHub
parent 3c6a5b0e1f
commit 58d0b9947b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -33,4 +33,9 @@ class UserDashboard extends Model
{
return $this->belongsTo('App\Models\Common\Dashboard');
}
public function dashboards()
{
return $this->belongsToMany('App\Models\Common\Dashboard', 'App\Models\Auth\UserDashboard');
}
}