rappasoft / vault

Roles & Permissions for the Laravel 5 Framework
MIT License
103 stars 10 forks source link

incorrectly getting pivot table name #8

Closed h3r2on closed 9 years ago

h3r2on commented 9 years ago

I'm using a fresh laravel 5 install with vault, followed the setup and navigating to /access/users throws a Query Builder exception:

Next exception 'ErrorException' with message 'SQLSTATE[42S02]: Base table or view not found: 1146 Table 'laravel_testbed.user_vault_permission' doesn't exist (SQL: select count(*) as aggregate from `permissions` inner join `user_vault_permission` on `permissions`.`id` = `user_vault_permission`.`permission_id` where `user_vault_permission`.`user_id` = 1) (View: /home/vagrant/Code/l5/resources/views/vendor/vault/index.blade.php)' in /home/vagrant/Code/l5/vendor/laravel/framework/src/Illuminate/Database/Connection.php:614

EDIT: After quick investigation the vault.permission_user_table Schema from migrations.stub is not getting copied over to the migration file. As well neither is the configuration option in the config file.

rappasoft commented 9 years ago

I'm about to try to replicate your problem, please allow me some time.

rappasoft commented 9 years ago

I downloaded a fresh Laravel 5.0.2 project and required this package, followed the setup and immediately received the attached image (after logging in of course). I was unable to replicate your issue. screen-capture

h3r2on commented 9 years ago

hmm must have been my mac then as I tried it like three times...great package by the way!

rappasoft commented 9 years ago

The only thing I can suggest is make sure after your vendor:publish you do an optimized dump-autoload as it gets kind of screwy if you dont. Edit: And thanks!