简体   繁体   中英

Issue while using Cartalyst Sentinel in Laravel 5.1

I have setup a project of Laravel 5.1 and required Cartalyst Setinel via composer and I've also finished the migrations and other processes. But the relationship is not maintained in the Database.

I've tried deleting users but the Activation and Role User Mappings stay even when the User has been deleted from the USER table, why is it happing like that ?

How can I have Role User Mapping if the User has been deleted from the USER table?

This issue is because you have not set foreign key relationship in the migrations. set foreign key relationship in migration and set referential integrity to cascade update and cascade delete it will resolve your problem.

If you don't know how to set referential integrity in migration you can take a look on laravel documentation. Here is the link for that-: https://laravel.com/docs/5.1/migrations#writing-migrations

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM