если у пользователей и ролей много-много связей, просто работайте, как показано ниже, для вашей проблемы
Вот примеры кодов User.php
class User extends Authenticatable implements CanResetPassword
{
protected $table = "users";
public function roles(){
return $this->belongsToMany(Role::class,'role_user');
}
}
Role.php
class Role extends Model{
protected $table = "roles";
public function users(){
return $this->belongsToMany(User::class,'role_user');
}
}
С вашего контроллера вы можете сделать это
class AnyTestController extends Controller{
public function test(){
//Suppose your user id is 1 then delete user from pivot table
$user = User::find(1);
$user->roles()->detach();
$user->delete();
}
}