Download the PHP package deegitalbe/trustup-pro-app-common without Composer
On this page you can find all versions of the php package deegitalbe/trustup-pro-app-common. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download deegitalbe/trustup-pro-app-common
More information about deegitalbe/trustup-pro-app-common
Files in deegitalbe/trustup-pro-app-common
Package trustup-pro-app-common
Short Description This package contains pieces of code that are shared between our applications.
License MIT
Informations about the package trustup-pro-app-common
Installation
Via composer
composer require deegitalbe/trustup-pro-app-common
Configuration
Environment
Package expects you to have those lines in your .env
TRUSTUP_ADMIN_URL=
TRUSTUP_APP_KEY=
TRUSTUP_APP_KEY
key should be unique identifier for current app. (e.g: "tasks" for application taches.trustup.pro)TRUSTUP_ADMIN_URL
should be defined in development mode only. (since package already has correct value for production)
Install command
Execute this command to install package and publish configuration.
php artisan trustup_pro_app_common:install
You will then have access to config/trustup_pro_app_common.php
that you have to configure properly.
Preparing your model
Your model should be in charge of application professionals accounts. Typically it is App\Models\System\Account.php
Default configuration
Implements interface
Your model should implements this interface
Deegitalbe\TrustupProAppCommon\Contracts\AccountContract
Use default trait
You can use this trait in your model to synchronize automatically
Deegitalbe\TrustupProAppCommon\Models\Synchronizable
Custom configuration
Implements interface
Same step as default configuration step
Define interface methods yourself
/**
* Account database id.
*
* @return int
*/
public function getId(): int;
/**
* Account uuid that should be used to retrieve account details.
*
* @return string
*/
public function getUuid(): string;
/**
* Application key linked to account.
*
* @return string
*/
public function getAppKey(): string;
/**
* Professional authorization_key linked to account.
*
* @return string
*/
public function getAuthorizationKey(): string;
/**
* Subscription id linked to account.
*
* @return string|null
*/
public function getSubscriptionId(): ?string;
/**
* Subscription status linked to account.
*
* @return string|null
*/
public function getSubscriptionStatus(): ?string;
/**
* Account creation date.
*
* @return Carbon
*/
public function getCreatedAt(): Carbon;
Watch model events using package trait
You can use this trait in your model to watch its event and react to it when needed
Deegitalbe\TrustupProAppCommon\Models\SynchronizeWhenSaved
All versions of trustup-pro-app-common with dependencies
deegitalbe/trustup-versioned-package Version ^1.0
deegitalbe/server-authorization Version ^1.1
henrotaym/laravel-flare-exception-handler Version ^1.0
deegitalbe/chargebee-client Version ^1.0
henrotaym/laravel-package-versioning-config Version ^1.2
hyn/multi-tenant Version ^5.6
spatie/laravel-event-sourcing Version ^3.2|^4.9
laravel/scout Version ^8.6.1|^9.4
meilisearch/meilisearch-php Version ^0.23.0
http-interop/http-factory-guzzle Version ^1.2
lcobucci/jwt Version ^4.1