What i want
我想使用通过 php artisan make:auth
命令获得的laravel认证系统
what happened
-
我可以看到注册表单注册的项目,但我无法使用这些凭据通过应用程序登录 .
-
错误:这些凭据与我们的记录不匹配 .
What i did
php artisan make:Auth
user.php的
namespace App;
use Illuminate\Contracts\Auth\Authenticatable;
use Illuminate\Auth\Authenticatable as AuthenticatableTrait;
use Illuminate\Database\Eloquent\Model;
class User extends Model implements Authenticatable
{
protected $fillable=['name','password','email'];
protected $table='blog_users';
public function getAuthIdentifierName(){}
public function getAuthIdentifier(){}
public function getAuthPassword(){}
public function getRememberToken(){}
public function setRememberToken($value){}
public function getRememberTokenName(){}
}
What i tried
我试图提供我的操作方法,但我仍然无法通过这些凭据登录,我仍然看到相同的错误 .
What i hope
为了更好地了解我的问题及其解决方案?
Snapshots
2 回答
这就是我的Laravel 5.3用户模型的样子:
我会假设所有这些空方法都会给你带来麻烦 .
Laravel比较Hased密码:
为此,您需要以下列任一方式存储密码:
要么
为了更好地理解这一点: - https://laravel.com/docs/5.0/hashing
希望这对你有所帮助 .