Closed blendsoft closed 7 years ago
@blendsoft Throw exception when model don't have any owners or when exact user not an owner of it?
Could you provide usage example, please?
You can use default firstOrFail
method mixed with whereOwnedBy
scope:
Article::whereKey($articleId)->whereOwnedBy($user)->firstOrFail();
Does this help?
Closing this issue. Feel free to continue conversation if solution proposed above didn't help.
Could you add method(s) throwing exception when not owner ?