Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/Fields/BelongsToMany.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
use Binaryk\LaravelRestify\Fields\Concerns\Attachable;
use Binaryk\LaravelRestify\Repositories\Repository;
use Closure;
use Exception;
use Illuminate\Auth\Access\AuthorizationException;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Gate;
Expand Down Expand Up @@ -55,7 +54,7 @@ public function resolve($repository, $attribute = null)
->allowToShow(app(Request::class))
->withExtraFields(
collect($this->pivotFields)->each(function (Field $field) use ($item) {
return $field->resolveCallback(fn() => $item->pivot->{$field->attribute});
return $field->resolveCallback(fn () => $item->pivot->{$field->attribute});
})->all()
)
->eagerState();
Expand Down
5 changes: 2 additions & 3 deletions src/Services/Concerns/ResetsPasswords.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

trait ResetsPasswords
{

/**
* Get the post register / login redirect path.
*
Expand Down Expand Up @@ -57,8 +56,8 @@ public function reset(Request $request)
// database. Otherwise we will parse the error and return the response.
$response = $this->broker()->reset(
$this->credentials($request), function ($user, $password) {
$this->resetPassword($user, $password);
}
$this->resetPassword($user, $password);
}
);

// If the password was successfully reset, we will redirect the user back to
Expand Down
6 changes: 3 additions & 3 deletions src/Services/Concerns/ThrottlesLogins.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

namespace Binaryk\LaravelRestify\Services\Concerns;

use Illuminate\Support\Str;
use Illuminate\Http\Request;
use Illuminate\Cache\RateLimiter;
use Illuminate\Auth\Events\Lockout;
use Illuminate\Cache\RateLimiter;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Lang;
use Illuminate\Support\Str;
use Illuminate\Validation\ValidationException;

trait ThrottlesLogins
Expand Down
6 changes: 3 additions & 3 deletions tests/Fields/HasManyTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public function test_has_many_present_on_relations()
$user = factory(User::class)->create();

factory(Post::class)->times(2)->create([
'user_id' => $user->id
'user_id' => $user->id,
]);

$this->get(UserWithPosts::uriKey()."/$user->id?related=posts")
Expand All @@ -51,8 +51,8 @@ public function test_has_many_present_on_relations()
'posts' => [
[
'id',
'attributes'
]
'attributes',
],
],
],
],
Expand Down