Skip to content

Commit

Permalink
Get repository from this (#422)
Browse files Browse the repository at this point in the history
* Get repository from this

* Fix styling

Co-authored-by: Vasile Papuc <[email protected]>
Co-authored-by: CaReS0107 <[email protected]>
  • Loading branch information
3 people authored Oct 7, 2021
1 parent 20ba2f1 commit 2970b3b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/Repositories/Repository.php
Original file line number Diff line number Diff line change
Expand Up @@ -636,7 +636,7 @@ public function store(RestifyRequest $request)

$fields->each(fn (Field $field) => $field->invokeAfter($request, $this->resource));

$request->repository()
$this
->collectFields($request)
->forStore($request, $this)
->withActions($request, $this)
Expand Down Expand Up @@ -709,7 +709,7 @@ public function update(RestifyRequest $request, $repositoryId)
fn (Field $field) => $field->invokeAfter($request, $this->resource)
);

$request->repository()
$this
->collectFields($request)
->forUpdate($request, $this)
->withActions($request, $this)
Expand Down
1 change: 0 additions & 1 deletion tests/Controllers/RepositoryPatchControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

namespace Binaryk\LaravelRestify\Tests\Controllers;

use Binaryk\LaravelRestify\Fields\Field;
use Binaryk\LaravelRestify\Tests\Fixtures\Post\Post;
use Binaryk\LaravelRestify\Tests\Fixtures\Post\PostRepository;
use Binaryk\LaravelRestify\Tests\IntegrationTest;
Expand Down

0 comments on commit 2970b3b

Please sign in to comment.