We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 396da16 commit 14600a7Copy full SHA for 14600a7
app/Providers/AuthServiceProvider.php
@@ -3,7 +3,6 @@
3
namespace App\Providers;
4
5
use App\User;
6
-use Illuminate\Support\Facades\Auth;
7
use Illuminate\Support\Facades\Gate;
8
use Illuminate\Support\ServiceProvider;
9
@@ -31,7 +30,7 @@ public function boot()
31
30
// should return either a User instance or null. You're free to obtain
32
// the User instance via an API token or any other method necessary.
33
34
- Auth::viaRequest('api', function ($request) {
+ $this->app['auth']->viaRequest('api', function ($request) {
35
if ($request->input('api_token')) {
36
return User::where('api_token', $request->input('api_token'))->first();
37
}
0 commit comments