Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

potentdevelopment's avatar

Laravel Backpack Permission Manager Role Error

I've installed Laravel Backpack and also the Permission Manager. In the admin, I can access the permissions fine but when I try to access the roles,

SQLSTATE[HY093]: Invalid parameter number
select count(*) as total_rows from (select `roles`.`id`, (select count(*) from `users` inner join `model_has_roles` on `users`.`id` = `model_has_roles`.`model_id` where `roles`.`id` = `model_has_roles`.`role_id` and `model_has_roles`.`model_type` = ?) as `users_count` from `roles`) as `roles_aggregator`

All of the roles are in the DB and I can see that they have been assigned permissions but when I try to access mydomain.com/admin/role is when this error is thrown.

Thank You

0 likes
2 replies
vincent15000's avatar

A parameter is missing, probably the one needed for the model type.

Have you checked if the route requires a parameter ?

potentdevelopment's avatar
Level 2

So this turned out to be a bug with the Laravel Backpack Permission Manager. Issue was opened on Github and has now been resolved.

Thank You.

Please or to participate in this conversation.