Am getting the below error, when I try to implement Auth::attempt()
The controller I have looks like
Argument 1 passed to Illuminate\Auth\EloquentUserProvider::validateCredentials() must be an instance of Illuminate\Contracts\Auth\Authenticatable, instance of App\Models\User given
The controller I have looks like
<?php namespace App\Http\Controllers\Admin;
use App\Http\Controllers\Controller;
use App\Models\User;
use Illuminate\Support\Facades\Auth;
use Illuminate\Contracts\Auth\Authenticable;
use Illuminate\Auth\UserInterface;
class AdminAjaxController extends Controller {
public function getLogin()
{
$data = array('email' => Input::get('email'), 'password' =>Input::get('password'));
Auth::attempt($data);
}
}