Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel Laravel Package

hivelink/laravel

Laravel SDK for Hivelink SMS and Inquiry API. Install via Composer, register the service provider/facade, publish config, and set your API key. Send SMS with Hivelink::SendSimple and handle API/HTTP exceptions.

View on GitHub
Deep Wiki
Context7

Hivelink Laravel

First of all you will ned an API Key . You can get one Here.

Supported Laravel Versions:
  • V.4
  • V.5
  • V.6
  • V.7
  • V.8
  • V.9
  • V.10

Installation

Step 1 - Install the package

  • Method 1: You can install hivelink/laravel with Composer directly in your project:
composer require hivelink/laravel

Step 2

Head to config/app.php and add this line to the end of providers Array:

Hivelink\Laravel\ServiceProvider::class,

So that array must me something like this:

'providers' => [
		/*
		* Laravel Framework Service Providers...
		*/
		.
		.
		.
		Hivelink\Laravel\ServiceProvider::class
]

Then in the config/app.php and add this line to the end of aliases Array:

'Hivelink' => Hivelink\Laravel\Facade::class,

Step 3 - Publish

Run this command in your project dirctory:

php artisan vendor:publish --provider="Hivelink\Laravel\ServiceProvider" --tag="config"

In the message appear, find the number of Hivelink, enter the related number then hit Enter.

Step 4 - Api-Key

Now you must define your API Key to project. for this head to config/hivelink.php then put your API KEY in the code:

<?php
return [
    'apikey' => ' ',
];

All Set

Usage

You can use the package where ever you want.

  • First use the class:
use Hivelink;

Then use this pattern to send SMS:

try{
    $sender = "9000****";	

    $message = "این یک پیام تست می باشد";

    $receiver = array("090********");

    $result = Hivelink::SendSimple($sender,$receiver ,$message);
    if($result){
        foreach($result as $r){
            var_dump($r)
        }
    }
}
catch(\Hivelink\Exceptions\ApiException $e){
    echo $e->errorMessage();
}
catch(\Hivelink\Exceptions\HttpException $e){
    echo $e->errorMessage();
}catch(\Exceptions $ex){
    echo $ex->getMessage()
}

Use this method get account balanced :

try{
    $result = Hivelink::getCredit();
    if($result){
        var_dump($result);
    }
}
catch(\Hivelink\Exceptions\ApiException $e){
    echo $e->errorMessage();
}
catch(\Hivelink\Exceptions\HttpException $e){
    echo $e->errorMessage();
}

Contribution

https://notif.hivelink.co

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
amashukov/lnd-client-php
althinect/enum-permission
andydefer/laravel-actions
aimeos/prisma
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky