bildvitta / sp-vendas
Installs: 1 394
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 12
Forks: 0
Open Issues: 0
Requires
- php: ^8.0|^8.1|^8.2|^8.3
- bildvitta/iss-sdk: ^0.1
- bildvitta/sp-crm: ^0.1
- bildvitta/sp-hub: ^0.1
- bildvitta/sp-produto: ^0.1
- illuminate/contracts: ^8.0|^9.0|^10.0|^11.0
- illuminate/database: ^8.0|^9.0|^10.0|^11.0
- illuminate/support: ^8.0|^9.0|^10.0|^11.0
- php-amqplib/php-amqplib: ^3.2.0
- spatie/laravel-package-tools: ^1.12
Requires (Dev)
- brianium/paratest: ^6.6
- friendsofphp/php-cs-fixer: ^3.9
- nunomaduro/collision: ^6.2
- orchestra/testbench: ^7.6
- phpunit/phpunit: ^9.5
This package is not auto-updated.
Last update: 2024-12-12 18:19:52 UTC
README
Introduction
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.
Installation
You can install the package via composer:
composer require bildvitta/sp-vendas
For everything to work perfectly in addition to having the settings file published in your application, run the command below:
php artisan sp-vendas:install
Configuration
This is the contents of the published config file:
return [ 'table_prefix' => env('MS_SP_VENDAS_TABLE_PREFIX', 'vendas_'), 'db' => [ 'host' => env('VENDAS_DB_HOST', '127.0.0.1'), 'port' => env('VENDAS_DB_PORT', '3306'), 'database' => env('VENDAS_DB_DATABASE', 'forge'), 'username' => env('VENDAS_DB_USERNAME', 'forge'), 'password' => env('VENDAS_DB_PASSWORD', ''), ], 'rabbitmq' => [ 'host' => env('RABBITMQ_HOST'), 'port' => env('RABBITMQ_PORT', '5672'), 'user' => env('RABBITMQ_USER'), 'password' => env('RABBITMQ_PASSWORD'), 'virtualhost' => env('RABBITMQ_VIRTUALHOST', '/'), 'exchange' => [], 'queue' => [] ], ];
Importing data
You can import initial data from the parent module by setting the database connection data in the configuration file. However, it will be necessary to import the data from the dependent modules first: sp-hub, sp-crm and sp-produto.
php artisan dataimport:vendas_sales
Database seeder
You can seed your database with fake data to work with. However, it will be necessary to seed the other dependencies first: sp-hub, sp-crm and sp-produto.
php artisan db:seed --class=SpVendasSeeder
Running the worker
After setting the message broker access data in the configuration file, you can run the worker to keep the data up to date.
php artisan rabbitmqworker:sales