We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 62c469d + 3dfcf8c commit d67f3d3Copy full SHA for d67f3d3
src/Http/Response.php
@@ -125,7 +125,7 @@ public function toResponse($request) {
125
$this->responsable->getOptions(),
126
$this->resource->isAutomaticGatingEnabled() ? [
127
config('rest.automatic_gates.key') => [
128
- config('rest.automatic_gates.names.authorized_to_create') => Gate::allows('create', $this->responsable->first()::class),
+ config('rest.automatic_gates.names.authorized_to_create') => Gate::allows('create', $this->resource::newModel()::class),
129
]
130
] : []
131
);
0 commit comments