Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow middleware to accept parameters #209

Closed

Conversation

jimohalloran
Copy link
Contributor

PR for code in issue #124 ... @cretueusebiu I notice this change hasn't been included yet, so I've created this PR for you to help with the process. This is just @imade-nl 's code form the ticket with a little additional documentation.

@Davides98
Copy link

So by editing these two files can I set different roles between the admin and user accounts?

@mitchellholzmann
Copy link

mitchellholzmann commented Oct 20, 2019

@Davides98 No, you will still need to use a package such as spatie/permission to actually have working roles/permissions and write the code for the store.

About the code, only thing I would change is use camelCase for the variables and make the role code pass eslint (spacing issues).

@Davides98
Copy link

@xazinji can you help me for this?

@jimohalloran
Copy link
Contributor Author

This code is not intended to be a complete roles/permissions implementation. A lot more work would still need to be done. See my comment on #218 for a bit more detail.

@cretueusebiu
Copy link
Owner

cretueusebiu commented Oct 31, 2020

Merged #289

@DasdWaller
Copy link

DasdWaller commented Nov 23, 2020

@cretueusebiu @jimohalloran Can you create an example of this feature?

@cretueusebiu
Copy link
Owner

cretueusebiu commented Nov 23, 2020

@DasdWaller https://github.com/cretueusebiu/laravel-vue-spa/blob/master/resources/js/middleware/role.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants