Hi guys,
I’ve installed as a package. Currently using Jetstream/Spatie/Livewire
I’ve found how to block route from guests.
I already have user roles setup.
I would like any users with a certain role to automatically have user accounts in the forum and access to it (not all logged in users, only ones with a certain role).
How do I do this?
1 Comment
Hi @Pete Swan, thanks for your question.
Take a look at the Laravel Authentication Integration docs. When implementing the
HasWaterholeUser
trait on your application'sUser
model, you will want to override thetoWaterholeUser()
method so that it only returns aPendingUser
object if the user has the correct role that allows them to access the forum: