palpalani / baylinks-laravel
PHP/Laravel framework SDK for BayLinks.
Installs: 1 841
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 0
Open Issues: 2
Requires
- php: ^8.2
- illuminate/contracts: ^10.0 | ^11.0
- saloonphp/saloon: ^3.0
- spatie/laravel-package-tools: ^1.14.0
Requires (Dev)
- larastan/larastan: ^2.0.1
- laravel/pint: ^1.0
- nunomaduro/collision: ^7.9|^8.1
- orchestra/testbench: ^8.0|^9.0
- pestphp/pest: ^2.0
- pestphp/pest-plugin-arch: ^2.0
- pestphp/pest-plugin-laravel: ^2.0
- phpstan/extension-installer: ^1.1
- phpstan/phpstan-deprecation-rules: ^1.0
- phpstan/phpstan-phpunit: ^1.0
README
BayLinks PHP SDK for Laravel framework.
BayLinks is a powerful URL shortening and management platform tailored for modern businesses. As a Software as a Service (SaaS) solution, BayLinks empowers organizations to create, customize, and track short links effortlessly. Perfect for marketing campaigns, email newsletters, and internal communications, BayLinks simplifies link sharing and enhances brand visibility. With robust analytics and customizable branding options, BayLinks is the go-to solution for businesses seeking efficient link management and optimization.
Installation
You can install the package via composer:
composer require palpalani/baylinks-laravel
You can publish the config file with:
php artisan vendor:publish --tag="baylinks-laravel-config"
Usage
Update the server information: return [ /** * BayLinks URL. */ 'server' => env('BAYLINKS_SERVER'), /** * Rest API version of BayLinks. */ 'api' => [ 'url' => 'api/v1', ], ];
Get the account Information: $bayLinks = BayLinks::client(); $bayLinks->accountDetails()->get(<BAYLINKS_API_KEY>);
Create a Single Short URL: $bayLinks->createShortURL() ->post(<BAYLINKS_API_KEY>, [ "destination" => "<Source URL>", // required "domain" => "<Custom domain>" // optional ] );
Create a Bulk Short URL: $bayLinks->createBulkURL() ->post(<BAYLINKS_API_KEY>, [ "destination": [ // required "<Source URL>", "<Source URL>" . . "<Source URL>" ], "domain": "<Custom domain>",// optional "planet": "jupiter", // optional "expire": 0, // optional "tag": [] // optional callback data ] );
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.