來源:互聯網
上載者:User
關鍵字
laravel
rbac
php
php架構
Laravel Framework version 5.2.31 按照Github上的說明,一步步配置的,到執行php artisan migrate 時會報錯:
[Illuminate\Database\QueryException] SQLSTATE[42000]: Syntax error or access violation: 1103 Incorrect table nam e '' (SQL: alter table `role_user` add constraint `role_user_user_id_foreig n` foreign key (`user_id`) references `` (`id`) on delete cascade on update cascade) [PDOException] SQLSTATE[42000]: Syntax error or access violation: 1103 Incorrect table nam e ''
查看資料庫中的表,只建立了roles和role_user兩個表!
回複內容:
Laravel Framework version 5.2.31 按照Github上的說明,一步步配置的,到執行php artisan migrate 時會報錯:
[Illuminate\Database\QueryException] SQLSTATE[42000]: Syntax error or access violation: 1103 Incorrect table nam e '' (SQL: alter table `role_user` add constraint `role_user_user_id_foreig n` foreign key (`user_id`) references `` (`id`) on delete cascade on update cascade) [PDOException] SQLSTATE[42000]: Syntax error or access violation: 1103 Incorrect table nam e ''
查看資料庫中的表,只建立了roles和role_user兩個表!
看這裡