Ad

Could Not Get Authorization.basic Working In Laravel 5.2.7

I am getting following error while calling for authentication

Type error: Argument 1 passed to Illuminate\Auth\EloquentUserProvider::validateCredentials() must be an instance of Illuminate\Contracts\Auth\Authenticatable, instance of App\User given,
Ad

Answer

You should make sure, you User class extends Illuminate\Foundation\Auth\User what is default in Laravel 5.2. This class implements Illuminate\Contracts\Auth\Authenticatable ant this contract is required in function validateCredentials:

Default User class for Laravel 5.2 can be found here: https://github.com/laravel/laravel/blob/master/app/User.php

Ad
source: stackoverflow.com
Ad