php - Laravel 8 护照 UUIDS
问题描述
我刚刚创建了新的 laravel 8 应用程序,但我在使用 Laravel Passport UUIDS 时遇到了一些问题。我已经安装了我需要的一切。更改了每次护照迁移$table->uuid('id')->primary();
一切都是默认的,例如 AuthServiceProvider 只是有Passport::routes();
我尝试按照https://mlo.io/blog/2018/08/17/laravel-passport-uuid/说明进行操作,但似乎不起作用。当我运行时,php artisan passport:install --uuids
我收到如下错误:
SQLSTATE[23000]: Integrity constraint violation: 1451 Cannot delete or update a parent row: a foreign key constraint fails (SQL: drop table if exists `users`)
是的,我有 user_devices 迁移,我有外国的 oauth_access_tokens,但即使我添加
public function register()
{
\Laravel\Passport\Passport::ignoreMigrations();
}
在 AppServiceProvider 中,它给出了同样的错误。
有人有同样的问题吗?任何相关的教程如何做到这一点?
解决方案
推荐阅读
- java - 在android中根据设备区域禁用逗号或点
- javascript - 离线模式处于活动状态时 react-native-firebase 是否安全?
- c# - 增加 ac# 数据库中的值
- r - 使用 R 将变量添加到列表中的列表中的数据框
- ef-code-first - 如何首先在 Asp.Net Core 3.0 代码中验证 Minlength 和 MaxLength uisng Fluent Api
- python - 用python算法分析多项选择问卷
- scala - 如何在火花中使用按键聚合同时找到最大值和最小值?
- arrays - 将宽数据名重塑为单列
- kubernetes - Kiali Dashboard 中的 Statefulsets pod
- facebook - 用户登录后如何从 Facebook 获取 Graph API 中的用户好友权限