Делаю авторизацию, но возникает ошибка:
ErrorException in Guard.php line 430:
Argument 1 passed to Illuminate\Auth\Guard::login() must be an instance of Illuminate\Contracts\Auth\Authenticatable, instance of App\User given
Модель
User.php:
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Contracts\Auth\Authenticatable;
class User extends Model
{
protected $table = 'users';
protected $fillable = array('username', 'tel');
}
Контроллер
AuthController.php :
<?php
namespace App\Http\Controllers;
use App\User;
use Auth;
use Redirect;
use Illuminate\Database\Eloquent;
class AuthController extends Controller {
public function Login() {
...
Auth::login($user);
return Redirect::to('/');
...
}