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
2 changes: 1 addition & 1 deletion config/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@

'frontend_app_url' => env('FRONTEND_APP_URL', env('APP_URL')),

'password_reset_url' => env('FRONTEND_APP_URL') . '/password/reset?token={token}&email={email}',
'password_reset_url' => env('FRONTEND_APP_URL').'/password/reset?token={token}&email={email}',
],

/*
Expand Down
2 changes: 1 addition & 1 deletion src/Services/LoginService.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ public function login(Request $request)

if ($this->attemptLogin($request)) {
event(new UserLoggedIn($this->guard()->user()));

return $this->guard()->user()->createToken('login');
}

Expand All @@ -43,6 +44,5 @@ public function login(Request $request)
$this->incrementLoginAttempts($request);

return $this->sendFailedLoginResponse($request);

}
}
3 changes: 2 additions & 1 deletion src/Services/RegisterService.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ public function validateRegister(array $payload)
return true;
}

protected function usingAuthService(AuthService $service) {
protected function usingAuthService(AuthService $service)
{
$this->authService = $service;

return $this;
Expand Down
1 change: 0 additions & 1 deletion src/Services/ResetPasswordService.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ public static function make(Request $request, AuthService $authService)
->reset($request);
}


protected function usingAuthService(AuthService $authService)
{
$this->authService = $authService;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
namespace Binaryk\LaravelRestify\Tests\Feature\Authentication;

use Binaryk\LaravelRestify\Events\UserLoggedIn;
use Binaryk\LaravelRestify\Notifications\PasswordResetNotification;
use Binaryk\LaravelRestify\Services\AuthService;
use Binaryk\LaravelRestify\Services\RegisterService;
use Binaryk\LaravelRestify\Tests\Fixtures\MailTracking;
Expand Down Expand Up @@ -55,6 +54,7 @@ public function test_email_was_sent_and_contain_token()

Notification::assertSentTo($user, ResetPassword::class, function ($notification) {
$this->assertNotEmpty($notification->token);

return true;
});
}
Expand Down
1 change: 0 additions & 1 deletion tests/Feature/Authentication/AuthServiceRegisterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ public function test_register_throw_user_not_authenticatable()

$request->merge($user);


$this->expectException(AuthenticatableUserException::class);
$this->authService->register($request);
}
Expand Down
1 change: 0 additions & 1 deletion tests/Fixtures/MailTracking.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

namespace Binaryk\LaravelRestify\Tests\Fixtures;

use Illuminate\Mail\Mailer;
use Illuminate\Support\Facades\Mail;
use Swift_Events_EventListener;
use Swift_Message;
Expand Down
1 change: 0 additions & 1 deletion tests/Fixtures/User/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

namespace Binaryk\LaravelRestify\Tests\Fixtures\User;

use Binaryk\LaravelRestify\Contracts\Passportable;
use Binaryk\LaravelRestify\Contracts\RestifySearchable;
use Binaryk\LaravelRestify\Contracts\Sanctumable;
use Binaryk\LaravelRestify\Tests\Fixtures\Post\Post;
Expand Down