The SP (Space Probe) package is responsible for collecting remote data updates for the module, keeping the data structure similar as possible, through the message broker.
You can install the package via composer:
composer require bildvitta/sp-hub:dev-develop
For everything to work perfectly in addition to having the settings file published in your application, run the command below:
php artisan sp:install
To configure the queues in RabbitMQ just run this command that it automatically creates based on the settings you passed in config/sp-hub.php
php artisan sp-hub:configure
This is the contents of the published config file:
return [
'rabbitmq' => [
'host' => env('RABBITMQ_HOST'),
'port' => env('RABBITMQ_PORT'),
'user' => env('RABBITMQ_USER'),
'password' => env('RABBITMQ_PASSWORD'),
'virtualhost' => env('RABBITMQ_VIRTUALHOST', '/'),
'exchange' => [
'hub' => env('RABBITMQ_EXCHANGE_HUB', 'hub'),
],
'queue' => [
'hub' => env('RABBITMQ_QUEUE_HUB'),
]
],
];
With the configuration file sp-hub.php published in your configuration folder it is necessary to create environment variables in your .env file:
Add these attributes to the user model's $fillable
property.
'document',
'address',
'street_number',
'complement',
'city',
'state',
'postal_code',