Closed m33ch closed 4 years ago
Hi all,
i have User, Album and Artist entities. User has albums relation like this:
public function albums($morph = null) { return $this->hyperMorph($morph, 'Album', 'PUBLISH', 'ON'); }
Artist has albums relation:
public function albums() { return $this->morphMany('Album', 'ON'); }
And Album has author relation:
public function author() { return $this->morphTo(); }
When i create an album i associate it to artist like this:
$user->albums($artist)->save($album);
My problem is when i try to update an album. How to check if logged user can update album?
I try to check it in various methods, but i not found a correct method.
Thanks
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Hi all,
i have User, Album and Artist entities. User has albums relation like this:
Artist has albums relation:
And Album has author relation:
When i create an album i associate it to artist like this:
My problem is when i try to update an album. How to check if logged user can update album?
I try to check it in various methods, but i not found a correct method.
Thanks