Closed tlartaud2 closed 3 years ago
I assume you get the provider error when you try to run the site and not during migration?
The only thing that should be set before migrating my package is the 'provider_uuids' => false|true,
as during migration that determines the owner_id/type morphs columns to use Char 36 (UUID) or unsignedBigInteger.
As for your setup currently, the only thing I see that may be an issue is you setting an abstract class as the model. I have never tested using it in that way, but if you have one main abstract class, I assume you have a User / other models that extend that base class. Instead of setting the abstract class in my config, can you try setting it to your parent User/Model that extends the abstract.
One other thing to note, my default SetMessengerProvider
middleware takes the current auth user from request to set as the provider.
protected function setProvider(Request $request): void
{
if ($request->user()) {
$this->messenger->setProvider(
$request->user()
);
}
}
If you need more control of how to grab the model you need other than just $request->user(), you can make your own middleware, as long as Messenger::setProvider($model) is called before the request hits any of my controllers.
I am online on my demo website as well, so feel free to hop on and message me there should you want a quicker response.
Hi there,
I've tried your messenger-demo app and it looks amazing! I am now trying to integrate it into my own Laravel app and I'm getting stuck with the following 403 error:
Messenger provider not set or compatible
. I got this message after I ranphp artisan migrate
.So I then edited the config file to have the following config, but it didn't work either. Should I have run
php artisan migrate
after editing this?My user model looks like this
Any chance that you can guide me to make this compatible?
Regards.