larapack / voyager-hooks

Hooks system integrated into Voyager.
MIT License
208 stars 22 forks source link

Fix permission seeding #29

Closed egidiusmengelberg closed 5 years ago

egidiusmengelberg commented 5 years ago

Hi,

It seems that running php artisan hook:setup does not add the created permission to the permission_role table. I added this functionality in this PR because not adding the permission results in not being able to view the hooks menu item within the voyager admin dashboard.

It may not be the best way of doing it but it works like a charm.

If you have any questions please ask!

Kind regards,

Egidius Mengelberg

emptynick commented 5 years ago

That would basically just grant each and every permission to the admin role.

egidiusmengelberg commented 5 years ago

Yeah I know, I just fixed it. I think it's better now.

egidiusmengelberg commented 5 years ago

Okay, currently the role to add the permissions to, will be retrieved from the voyager config file. It might be better to do this from the voyager-hooks config file. But that means you will be changing a lot of config files...