We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0690b07 commit eaf20b7Copy full SHA for eaf20b7
src/AttachMany.php
@@ -71,9 +71,13 @@ public function resolve($resource, $attribute = null)
71
72
public function authorize(Request $request)
73
{
74
+ if(! $this->resourceClass::authorizable()) {
75
+ return true;
76
+ }
77
+
78
return call_user_func([ $this->resourceClass, 'authorizedToViewAny'], $request)
- && $request->newResource()->authorizedToAttachAny($request, $this->resourceClass::newModel())
- && parent::authorize($request);
79
+ && $request->newResource()->authorizedToAttachAny($request, $this->resourceClass::newModel())
80
+ && parent::authorize($request);
81
}
82
83
public function height($height)
0 commit comments