rubengomez / mints
MINTS library allows to connect your Laravel App to MINTS.CLOUD
dev-develop
2024-07-26 00:31 UTC
Requires
- ext-json: *
- doctrine/inflector: ^2.0
- guzzlehttp/guzzle: ^7.0
- predis/predis: ^1.1
This package is not auto-updated.
Last update: 2025-03-21 19:54:22 UTC
README
- User Auth Trait is a trait that is used to authenticate users in the application.
- Contact Auth Trait is a trait that is used to authenticate contacts in the application.
- Public Auth Trait is a trait that is used to access public data in the application.
use Mints\UserAuthTrait; use Mints\ContactAuthTrait; use Mints\PublicAuthTrait;
Mints User, Contact and Public Usage
// User Login $this->initializeUserClient(); $this->mintsUserLogin('email', 'password'); $response = $this->mintsUser->getContacts(); // get contacts // Contact Login $this->initializeContactClient(); $this->mintsContactLogin('email', 'password'); $response = $this->mintsContact->getOrders(); // get orders // Public trait usage $this->initializePublicClient(); $response = $this->mintsPublic->getStoryVersions(null, false); // get story versions
Proxy Usage
Route::any('api/user/v1/{any}', [ProxyController::class, 'proxyRequest'])->where('any', '.*'); Route::any('api/contact/v1/{any}', [ProxyController::class, 'proxyRequest'])->where('any', '.*'); Route::any('api/v1/{any}', [ProxyController::class, 'proxyRequest'])->where('any', '.*');