Skip to content

Commit

Permalink
Merge pull request #18 from palpalani/develop
Browse files Browse the repository at this point in the history
Use latest version of packages
  • Loading branch information
palpalani authored Apr 23, 2024
2 parents 77c3cf6 + d7ba57c commit 6332942
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ body:
attributes:
label: Laravel Version
description: What version of Laravel are you running? Please be as specific as possible
placeholder: 9.0.0
placeholder: 11.0.0
validations:
required: true
- type: dropdown
Expand Down
24 changes: 16 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

BayLinks PHP SDK for Laravel framework.

[BayLinks](https://baylinks.io) 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](https://baylinks.io) simplifies link sharing and enhances brand visibility. With robust analytics and customizable branding options, [BayLinks](https://baylinks.io) is the go-to solution for businesses seeking efficient link management and optimization.

## Installation

You can install the package via composer:
Expand All @@ -27,33 +29,41 @@ php artisan vendor:publish --tag="baylinks-laravel-config"
Update the server information:

return [
'server' => env('BAYLINKS_SERVER'), // Server domain

/**
* BayLinks URL.
*/
'server' => env('BAYLINKS_SERVER'),

/**
* Rest API version of BayLinks.
*/
'api' => [
'url' => 'api/v1', // API Version
'url' => 'api/v1',
],
];

```

```php
Get the account Information:

$bayLinks = BayLinks::client();
$bayLinks->accountDetails()->get(<BAYLINKS_API_KEY>);

```

```php
Create a Single Short URL:

$bayLinks->createShortURL()
->post(<BAYLINKS_API_KEY>,
[
"destination" => "<Source URL>", // required
"domain" => "<Custom domain>" // optional
"destination" => "<Source URL>", // required
"domain" => "<Custom domain>" // optional
]
);

```

```php
Create a Bulk Short URL:

Expand All @@ -73,10 +83,8 @@ $bayLinks->createBulkURL()
"tag": [] // optional callback data
]
);

```


## Testing

```bash
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"require": {
"php": "^8.2",
"illuminate/contracts": "^10.0 | ^11.0",
"sammyjo20/saloon": "^2.8",
"saloonphp/saloon": "^3.0",
"spatie/laravel-package-tools": "^1.14.0"
},
"require-dev": {
Expand Down

0 comments on commit 6332942

Please sign in to comment.