Hello the Error I'm getting is as follows.
Argument 2 passed to BeyondCode\LaravelWebSockets\Apps\App::__construct() must be of the type string, null given, called in F:\xampp\htdocs\medpilot\api\vendor\beyondcode\laravel-websockets\src\Apps\ConfigAppProvider.php on line 63
Here are my .env settings yes I didn't include the APP stuff as I figured this was self explanatory.
`LOG_CHANNEL=stack
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=testapp
DB_USERNAME=root
DB_PASSWORD=
BROADCAST_DRIVER=pusher
CACHE_DRIVER=file
QUEUE_CONNECTION=sync
SESSION_DRIVER=file
SESSION_LIFETIME=120
REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379
MAIL_DRIVER=smtp
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
PUSHER_APP_ID=12345
PUSHER_APP_KEY=ABCDEFG
PUSHER_APP_SECRET=HIJKLMNOP
PUSHER_APP_CLUSTER=mt1
MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"`
Here is what I put in the pusher broadcasting info.
'pusher' => [
'driver' => 'pusher',
'key' => env('PUSHER_APP_KEY'),
'secret' => env('PUSHER_APP_SECRET'),
'app_id' => env('PUSHER_APP_ID'),
'options' => [
'cluster' => env('PUSHER_APP_CLUSTER'),
//TODO: turn this to true when leaving localhost.
'encrypted' => false,
'host' => '127.0.0.1',
'port' => 6001,
//TODO: this will change when leaving localhost.
'scheme' => 'http'
],
],
Last but not least here are the apps settings under the websockets config file.
'apps' => [
[
'id' => env('PUSHER_APP_ID'),
'name' => env('APP_NAME'),
'key' => env('PUSHER_APP_KEY'),
'secret' => env('PUSHER_APP_SECRET'),
'path' => env('PUSHER_APP_PATH'),
'capacity' => null,
'enable_client_messages' => false,
'enable_statistics' => true,
],
],
I then ran php artisan websockets:serve and went to my domain to make sure I was getting the base laravel app which I did. Then I attempted to go to laravel-websockets and that is the error I get back from laravel.
After migrating the one db table and setting up the broadcast and websockets area there error above is what I'm getting any idea what may be causing this?...
This would suggest that your app key property, is being set to a null value. Verify that env('PUSHER_APP_KEY') returns a string,
doing php artisan config:clear is what fixed this issue thanks again for the reply.
Most helpful comment
doing php artisan config:clear is what fixed this issue thanks again for the reply.