chat
chat copied to clipboard
Non-static method 'createConversation' should not be called statically
Non-static method 'createConversation' should not be called statically
1- When Changing "use Musonza\Chat\Chat" to "use Chat" i get Class 'Chat' not found
2- When adding the facade Chat to config/app.php i get "Argument 1 passed to Musonza\Chat\Chat::__construct() must be an instance of Musonza\Chat\Services\MessageService, instance of Illuminate\Foundation\Application given, called in /home/tawsse59/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php on line 208"
3- am using L8.X
In config/app.php
add the following to aliases
:
'Chat' => Musonza\Chat\Facades\ChatFacade::class,
And while you're at it, you probably need this too in providers
:
Musonza\Chat\ChatServiceProvider::class,
Thank you, it works.
I'm trying to use this on a "boot() ::creating" function inside a model but got the same error.
I added both lines in config/app.php and used
use Musonza\Chat\Chat;
use \Chat;
and
use Chat;
Without any luck.
Having the same issue, I tried updating config/app.php
but it didn't work for me, I'm using Laravel 8.
+1
This works for me in Laravel 9:
use Musonza\Chat\Facades\ChatFacade as Chat;