Skip to content

Commit

Permalink
Merge pull request #122 from einnar82/master
Browse files Browse the repository at this point in the history
Wrap the Request instance into NovaRequest
  • Loading branch information
harrysbaraini authored Dec 21, 2023
2 parents a5593f8 + 5103813 commit ae8896d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Observers/NovaInlineRelationshipObserver.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace KirschbaumDevelopment\NovaInlineRelationship\Observers;

use Laravel\Nova\Nova;
use Laravel\Nova\Http\Requests\NovaRequest;
use Illuminate\Database\Eloquent\Model;
use Laravel\Nova\Http\Requests\NovaRequest;
use KirschbaumDevelopment\NovaInlineRelationship\Integrations\Integrate;
Expand Down Expand Up @@ -95,7 +96,7 @@ public function getRelationshipObserver(Model $model, $relationship): ?Relations
*/
protected function getModelRelationships(Model $model)
{
return collect(Nova::newResourceFromModel($model)->fields(app(NovaRequest::class)))
return collect(Nova::newResourceFromModel($model)->fields(Nova::createFrom(request())))
->flatMap(function ($value) {
return Integrate::fields($value);
})
Expand Down

0 comments on commit ae8896d

Please sign in to comment.