PHPackages                             liviu-hariton/smslink-laravel - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. liviu-hariton/smslink-laravel

ActiveLibrary[API Development](/categories/api)

liviu-hariton/smslink-laravel
=============================

A Laravel package that provides convenient access to the SMSlink.ro API

v1.1.1(1y ago)04MITPHPPHP &gt;=8.3

Since Mar 2Pushed 1y ago1 watchersCompare

[ Source](https://github.com/liviu-hariton/smslink-laravel)[ Packagist](https://packagist.org/packages/liviu-hariton/smslink-laravel)[ RSS](/packages/liviu-hariton-smslink-laravel/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (1)Versions (4)Used By (0)

SMSLink Laravel package
=======================

[](#smslink-laravel-package)

[![Latest Version on Packagist](https://camo.githubusercontent.com/e97c833a1b6a45542a05b2a6e6d3172859ea48a6e584f399abea54b67795c3d9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6c697669752d68617269746f6e2f736d736c696e6b2d6c61726176656c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/liviu-hariton/smslink-laravel)[![](https://camo.githubusercontent.com/85f32975abf6e652abd9caa8fb5260f4ee6c3339207d9aa207f91293cd955820/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d31312d6634363435662e737667)](https://github.com/laravel)[![Total Downloads](https://camo.githubusercontent.com/bf814539fbdf4ee7ed33372c48a1ccf8f257c7dd2527b278bdd8ee88dc302d1e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6c697669752d68617269746f6e2f736d736c696e6b2d6c61726176656c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/liviu-hariton/smslink-laravel)[![](https://camo.githubusercontent.com/b8cadaa967891081f8f165695470689986c028821dd8a040132f6e661795dc0d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c7565)](https://github.com/liviu-hariton/smslink-laravel/blob/main/LICENSE.md)

A Laravel PHP package that provides convenient access to the [SMSLink](https://www.smslink.ro) API.

Overview
--------

[](#overview)

Integration with SMSLink offers the ability to perform the following actions:

- send a single SMS message
- send SMS messages in bulk
- get the balance of the account

Table Of Content
----------------

[](#table-of-content)

- [Requirements](#requirements)
- [Installation](#installation)
- [Usage](#usage)
    - [Alter the default credentials after initialization](#alter-the-default-credentials-after-initialization)
    - [Send a single SMS message](#send-a-single-sms-message)
    - [Send messages in bulk](#send-messages-in-bulk)
    - [Check the current balance](#check-the-current-balance)
    - [Get the delivery report](#get-the-delivery-report)
- [Uninstallation](#uninstallation)
- [License](#license)
- [SMSLink official API documentation](#smslink-official-api-documentation)
- [Disclaimer](#disclaimer)

Requirements
------------

[](#requirements)

- PHP &gt;= 8.3
- [Laravel](https://github.com/laravel/laravel) &gt;= 11.0

Installation
------------

[](#installation)

You can install the SMSLink Laravel package via Composer. Run the following command in your terminal:

```
composer require liviu-hariton/smslink-laravel
```

Laravel will automatically register the package.

Publish the config file of this package with this command

```
php artisan vendor:publish --tag=smslink_config
```

The following config file will be published in `config/smslink.php`

```
return [
    'connection_id' => env('SMSLINK_CONNECTION_ID', ''), // the SmsLink `Connection ID`
    'connection_password' => env('SMSLINK_CONNECTION_PASSWORD', ''), // the SmsLink `Connection Password`
];
```

Edit your `.env` file and add the following to it:

```
SMSLINK_CONNECTION_ID=
SMSLINK_CONNECTION_PASSWORD=

```

You can get the `Connection ID` and `Connection Password` values from your [SMSLink connections manager section](https://www.smslink.ro/sms/gateway/setup.php)

Usage
-----

[](#usage)

When the installation is done you can easily start consuming the SMSLink's API by using the available methods. All methods will return a JSON formatted data. Just inject the dependency in your controller's methods.

### Alter the default credentials after initialization

[](#alter-the-default-credentials-after-initialization)

In case you want to use different credentials for a specific request or you have them stored in a database, you can set them using the `setConfig()` method.

```
