webreinvent / vaahextend
Quickly adaptable helpers to extend VaahCMS
Installs: 4 802
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 3
Forks: 0
Open Issues: 1
Requires
- php: ^8.1
- ext-curl: *
- ext-imap: *
- ext-json: *
- league/oauth2-google: ^4.0
- php-imap/php-imap: ^5.0
- phpmailer/phpmailer: ^6.6
- 2.x-dev
- 2.0.4
- 2.0.2
- 1.x-dev
- 1.0.1
- 0.0.5
- 0.0.4
- v0.0.3
- v0.0.2
- v0.0.1
- dev-1.x-develop
- dev-2.x-develop
- dev-2.x-release/v2.0.4
- dev-1.x-feature/get-attachment-download-develop-2x
- dev-1.x-feature/get-attachment-download
- dev-1.x-feature/update-vaa-apollo-getPeople-method
- dev-2.x-release/v2.0.3
- dev-2.x-release/v2.0.1
- dev-1.x-feature/update-packages-php
- dev-1.x-feature/update-packages-php8.1
- dev-2.x-feature/update-packages-php81
- dev-develop
- dev-1.x-feature/add-vaahpaypal
- dev-feature/update-readme
- dev-master
- dev-release/v0.0.5
- dev-feature/add-readme
- dev-feature/Update-Stripe-Helper-for-3D-(OTP)-verification
- dev-feature/add-VaahStripe
- dev-feature/add-VaahEventBrite
- dev-release/v0.0.4
- dev-release/v0.0.3
- dev-release/v0.0.2
- dev-release/v0.0.1
This package is auto-updated.
Last update: 2024-11-23 18:10:23 UTC
README
Small Laravel Helpers
Installation
composer require webreinvent/vaahextend
Add ServiceProvide in config/app.php
:
'providers' => [ ... WebReinvent\VaahExtend\VaahExtendServiceProvider::class, ... ]
Helper Libraries
- VaahAjax
- VaahArtisan
- VaahAssets
- VaahCountry
- VaahExtract
- VaahFiles
- VaahImap
- VaahMail
- VaahModule
- VaahSmtp
- VaahStripe
- VaahUrl
VaahArtisan
Add Facade in config/app.php
:
'aliases' => [ ... 'VaahArtisan' => \WebReinvent\VaahExtend\Facades\VaahArtisan::class, ... ]
Method
\VaahArtisan::migrate($command, $path, $db_connection_name ); \VaahArtisan::seed($command, $class, $db_connection_nane);
VaahCountry
Add Facade in config/app.php
:
'aliases' => [ ... 'VaahCountry' => \WebReinvent\VaahExtend\Facades\VaahCountry::class, ... ]
Method
\VaahCountry::getByCode($country_code); \VaahCountry::getByName($country_name); \VaahCountry::getByCallingCode($calling_code); \VaahCountry::getListSelectOptions($show='country_name'); \VaahCountry::getList(); \VaahCountry::getListWithSlug(); \VaahCountry::getListWithSlugAsCallingCode(); \VaahCountry::getTimeZones();
VaahModule
Add Facade in config/app.php
:
'aliases' => [ ... 'VaahModule' => \WebReinvent\VaahExtend\Facades\VaahModule::class, ... ]
Method
\VaahModule::getVaahCmsPath(); \VaahModule::getRootPath($module_name); \VaahModule::getRelativePath($module_name); \VaahModule::getAllPaths(); \VaahModule::getAllNames(); \VaahModule::getConfigs($module_name); \VaahModule::getConfig($module_name, $key); \VaahModule::getVersion($module_name); \VaahModule::getVersionNumber($module_name); \VaahModule::getAssetsUrl($module_name, $file_path); \VaahModule::getMigrationPath($module_name); \VaahModule::getSeedsClass($module_name); \VaahModule::getTenantMigrationPath($module_name); \VaahModule::getTenantSeedsClass($module_name); \VaahModule::getTenantSampleData($module_name); \VaahModule::getNamespace($module_name); \VaahModule::getServiceProvider($module_name);
VaahEventBrite
Add Facade in config/app.php
:
'aliases' => [ ... 'VaahEventBrite' => WebReinvent\VaahExtend\Facades\VaahEventBrite::class, ... ]
Add env configuration:
...
EVENTBRITE_KEY=xxxxxxxxxxxxxxxx
EVENTBRITE_ORG_ID=xxxxxxxxxxxxx
...
Reference url: https://www.eventbrite.com/platform/api#/reference
Method
\VaahEventBrite::events()->get(); $event_id = 12345; \VaahEventBrite::events()->find($event_id); $event = [ 'name'=>'Event Name', 'description'=>'Event description', .... ... ]; \VaahEventBrite::events()->store($event); \VaahEventBrite::events()->update($event_id, $event); \VaahEventBrite::events()->cancel($event_id); \VaahEventBrite::events()->publish($event_id); \VaahEventBrite::events()->delete($event_id); \VaahEventBrite::attendees()->get($event_id); \VaahEventBrite::attendees()->find($event_id, $attendee_id); \VaahEventBrite::orders()->find($order_id); \VaahEventBrite::organizations()->get();
VaahStripe
Command to add Package:
composer require cartalyst/stripe-laravel
Add Facade in config/app.php
:
'aliases' => [ ... 'VaahStripe' => WebReinvent\VaahExtend\Facades\VaahStripe::class, ... ]
Add env configuration:
...
STRIPE_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
...
Reference url: https://stripe.com/docs/api
Method
- Stripe One Time Payment
$customer => [
'name' => 'xxxxxx',
'email' => 'xx@example.com'
];
$card => [
'number' => 'xxxx-xxxx-xxxx-xxxx',
'exp_month' => '01', // 01-12
'exp_year' => '2021',
'cvc' => 'xxx'
];
$package => [
'currency' => 'usd', // usd / USD
'amount' => '01',
'description' => 'xxxxxx'
];
$address => [
'city' => 'xxxxxx', // optional
'country' => 'xxxxxx',
'line1' => 'xxxxxx',
'line2' => 'xxxxxx', // optional
'postal_code' => '123456', // optional
'state' => 'xxxxxx' // optional
];
$return_url // URL to redirect your customer back to after they authenticate or cancel their payment
\VaahStripe::pay($customer, $card, $package, $address, $return_url);
- Stripe Subscription
$customer => [ 'name' => 'xxxxxx', 'email' => 'xx@example.com' ]; $card => [ 'number' => 'xxxx-xxxx-xxxx-xxxx', 'exp_month' => '01', // 01-12 'exp_year' => '2021', 'cvc' => 'xxx' ]; $address => [ 'city' => 'xxxxxx', // optional 'country' => 'xxxxxx', 'line1' => 'xxxxxx', 'line2' => 'xxxxxx', // optional 'postal_code' => '123456', // optional 'state' => 'xxxxxx' // optional ]; $price_id // Price define the unit cost, currency, and (optional) billing cycle for Subcription $return_url // URL to redirect your customer back to after they authenticate or cancel their payment \VaahStripe::subscription($customer, $card, $address, $price_id, $return_url);
- Create Product
$request => [ 'name' => 'xxxxxx', 'description' => 'xxxxxx' ]; \VaahStripe::createProduct($request);
- Create Price
$request => [ 'product_id' => 'xxxxxx', 'currency' => 'usd', 'amount' => '01', 'interval' => '01' ]; \VaahStripe::createPrice($request);
- Find Product
\VaahStripe::findProductByName($name);
- Find Price
$product_id $value //optional $by //optional default = amount amount/currency/interval \VaahStripe::getProductPrice($product_id, $value, $by);
VaahCountry
Add Facade in config/app.php
:
'aliases' => [ ... 'VaahCountry' => \WebReinvent\VaahExtend\Facades\VaahCountry::class, ... ]
VaahMail
Add Facade in config/app.php
:
'aliases' => [ ... 'VaahMail' => WebReinvent\VaahExtend\Facades\VaahMail::class, ... ]
VaahImap
- reference: https://github.com/barbushin/php-imap
Add Facade in config/app.php
:
'aliases' => [ ... 'VaahImap' => WebReinvent\VaahExtend\Facades\VaahImap::class, ... ]