Download the PHP package ghasedak/laravel without Composer

On this page you can find all versions of the php package ghasedak/laravel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel


Ghasedak Laravel SDK

Easy-to-use SDK for implementing Ghasedak SMS API in your Laravel projects.
Explore the docs »

Web Service Documents · REST API . Report Bug · Request Feature


contributors forks stars issues license

مستندات فارسی

## Table of Contents * [Install](#install) * [Update](#update) * [Usage](#usage) * [Parameters](#parameters) * [Example](#example) * [One-Time Passwords (OTP)](#one-time-passwords-otp) * [Parameters](#parameters-1) * [Example](#example-1) * [Licence](#license) ## Install The easiest way to install is by using Composer: Composer is a dependency manager for PHP which allows you to declare the libraries your project depends on, and it will manage (install/update) them for you. If you are not familiar with Composer, you can read its documentations and download it via [getcomposer.org](https://getcomposer.org/). ## Update Set this line to Composer.json file in your project: "ghasedak/laravel": "*" Then run following command to update using composer Composer update the required packages on your local machine. ## usage To use the package, you need an API key. To get that you should have a [Ghasedak](https://ghasedak.me) account. Register and get your API key.
Copy the following variable into your project's `.env` file and change `your_api_key` to the key you have got from your Ghasedak account. Use `GhasedakFacade` on top of your controller or wherever you want: then you can use `GhasedakApi` methods statically, to use ` SendSimple` ####OR ## Parameters | Parameter | Required | Description | Type | Example | | --- | --- | --- | --- | --- | | message | Yes | Text to be sent | string | Hello, World! | | receptor | Yes | The number of the recipient(s) of the message (seperated by comma `,`). | string | 09111111111 | | linenumber | No | The number of the sender of the message, which, if not specified, will be selected from your dedicated lines with a higher priority.**** | string | 5000222 | | senddate | No | The exact date and time of sending the message based on Unix time, if not specified, the message will be sent instantly. | string | 1508144471 | | checkid | No | It is used to set a unique number for each SMS, and after sending the SMS, all the information of the sent message can be received with the `status` method. | string | 2071 | ## Example Here is a sample code for sending SMS. Please note that you must specify `line number` if you don't have a dedicated line. ## One-Time Passwords (OTP) The One-Time-Password (OTP) Interface is used to perform a mobile authentication or to implement Two-Factor-Authentication (2FA). You can pass up to 10 `param` to `Verify` method: ## Parameters | Parameter | Required | Description | Type | Example | | --- | --- | --- | --- | --- | | receptor | Yes | The number of the recipient of the message. | string | 09111111111 | | type | Yes | Set `1` to send text message and `2` to send voice message. | int | Hello, World! | | template | Yes | The title of the template you created in your panel. | string | my-template | | checkid | No | It is used to set a unique number for each SMS, and after sending the SMS, all the information of the sent message can be received with the `status` method. | string | 2071 | | param1 | Yes | The values you enter (You must enter at least one parameter). | string | abcdef | | param2 | No | The values you enter. | string | abcdef | | param3 | No | The values you enter. | string | abcdef | | param4 | No | The values you enter. | string | abcdef | | param5 | No | The values you enter. | string | abcdef | | param6 | No | The values you enter. | string | abcdef | | param7 | No | The values you enter. | string | abcdef | | param8 | No | The values you enter. | string | abcdef | | param9 | No | The values you enter. | string | abcdef | | param10 | No | The values you enter. | string | abcdef | ## Example :) ## License Freely distributable under the terms of the [MIT](https://opensource.org/licenses/MIT) license.

فهرست مطالب

  • نصب
  • به روزرسانی
  • استفاده
    • پارامترها
    • نمونه کد
  • رمز عبور یک‌بار مصرف
    • پارامترها
    • نمونه کد
  • مجوز

نصب

ساده‌ترین راه برای نصب این پکیج استفاده از Composer است:

Composer سامانه‌ای برای مدیریت بسته‌های زبان PHP است که به شما امکان مدیریت (نصب / به روزرسانی) پکیج‌های نوشته شده در این زبان را می‌دهد. اگر با کامپوزر آشنایی ندارید، می‌توانید از طریق سایت getcomposer.org مستندات آن را مطالعه و اقدام به بارگیری و نصب آن کنید.

به روزرسانی

خط زیر را در فایل composer.json به صورت زیر تغییر دهید :

سپس خط فرمان زیر را اجرا نمایید :

کامپوزر با اجرای این خط فرمان پکیج و نیازمندی های آن را در برنامه شما به روزرسانی خواهد کرد.

نحوه استفاده

برای استفاده از این پکیج می‌بایست API key داشته باشید. جهت دریافت ابتدا در سایت قاصدک ثبت‌نام کنید و از پنل کاربری‌تان API key دریافت کنید.

متغیر زیر را درون فایل .env پروژه‌ی خود کپی کرده و به جای your_api_key کلید دریافتی از حساب قاصدک خود را قرار دهید.

در بالای کنترلر یا هر جایی از پروژه GhasedakApi را استفاده کنید:
سپس شما میتوانید از متد های GhasedakApi به صورت استاتیک استفاده کنید برای استفاده از SendSimple
####یا :))

پارامترها

پارامتر اجباری توضیحات نوع مثال
message بله متنی که باید ارسال شود. string سلام دنیا!
receptor بله شماره گیرنده پیام می باشد. string 09111111111
linenumber خیر شماره فرستنده پیام می باشد، که اگر قید نشود از بین خطوط اختصاصی شما خط با اولویت بالاتر انتخاب می شود.( در صورت نداشتن خط اختصاصی باید linenumber را مشخص نمایید ) string 5000222
senddate خیر تاریخ و زمان دقیق ارسال پیام بر اساس Unixtime می باشد که اگر قید نشود در همان لحظه پیام ارسال می شود. string 1508144471
checkid خیر برای تعیین شماره ای یکتا از طرف کاربر برای هر پیامک به کار می رود و پس از ارسال پیامک می توان با متد status کلیه اطلاعات پیام ارسال شده را دریافت کرد. string 2071

نمونه کد

کد زیر نمونه‌ای از متد ارسال تکی پیامک می‌باشد. لطفا توجه کنید که در صورت نداشتن خط اختصاصی می‌بایست حتما line number را وارد کنید.

رمز عبور یکبار مصرف (OTP)

رمز عبور یک‌بار مصرف برای اعتبارسنجی از طریق تلفن همراه و یا برای ورود دو مرحله‌ای (2FA) استفاده می‌شود.

با استفاده از متد Verify می‌توانید تا سقف 10 param را ارسال کنید:

پارامترها

پارامتر اجباری توضیحات نوع مثال
receptor بله شماره گیرنده پیام که با ( , ) از هم جدا می شوند. string 09111111111
type بله برای ارسال پیام متنی عدد 1 و برای ارسال پیام صوتی عدد 2 را وارد کنید. int Hello, World!
template بله عنوان قالبی که در پنل خود ایجاد کرده اید. string my-template
checkid خیر برای تعیین شماره ای یکتا از طرف کاربر برای هر پیامک به کار می رود و پس از ارسال پیامک می توان با متد status کلیه اطلاعات پیام ارسال شده را دریافت کرد string 2071
param1 بله مقادیری که از سمت شما وارد می شود (وارد کردن حداقل 1 مورد اجباری است). string abcdef
param2 خیر مقادیری که از سمت شما وارد می شود. string abcdef
param3 خیر مقادیری که از سمت شما وارد می شود. string abcdef
param4 خیر مقادیری که از سمت شما وارد می شود. string abcdef
param5 خیر مقادیری که از سمت شما وارد می شود. string abcdef
param6 خیر مقادیری که از سمت شما وارد می شود. string abcdef
param7 خیر مقادیری که از سمت شما وارد می شود. string abcdef
param8 خیر مقادیری که از سمت شما وارد می شود. string abcdef
param9 خیر مقادیری که از سمت شما وارد می شود. string abcdef
param10 خیر مقادیری که از سمت شما وارد می شود. string abcdef

نمونه کد

مجوز

این پکیج تحت مجوز MIT منتشر شده است.


All versions of laravel with dependencies

PHP Build Version
Package Version
Requires ghasedak/php Version ^2.1.3
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package ghasedak/laravel contains the following files

Loading the files please wait ....