We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8b3a268 commit c172435Copy full SHA for c172435
src/Http/Controllers/Auth/LoginController.php
@@ -5,6 +5,7 @@
5
use Binaryk\LaravelRestify\Tests\Fixtures\User\User;
6
use Illuminate\Http\Request;
7
use Illuminate\Routing\Controller;
8
+use Illuminate\Support\Facades\Auth;
9
use Illuminate\Support\Facades\Hash;
10
11
class LoginController extends Controller
@@ -27,6 +28,8 @@ public function __invoke(Request $request)
27
28
abort(401, 'Invalid credentials.');
29
}
30
31
+ Auth::login($user);
32
+
33
return rest($user)->indexMeta([
34
'token' => $user->createToken('login')->plainTextToken,
35
]);
0 commit comments