diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml
new file mode 100644
index 0000000..a55e7a1
--- /dev/null
+++ b/.idea/codeStyles/codeStyleConfig.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/kavenegar-laravel.iml b/.idea/kavenegar-laravel.iml
new file mode 100644
index 0000000..c956989
--- /dev/null
+++ b/.idea/kavenegar-laravel.iml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
new file mode 100644
index 0000000..0606d60
--- /dev/null
+++ b/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
new file mode 100644
index 0000000..94a25f7
--- /dev/null
+++ b/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
new file mode 100644
index 0000000..22e7989
--- /dev/null
+++ b/.idea/workspace.xml
@@ -0,0 +1,70 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1605432381569
+
+
+ 1605432381569
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..05dc5ba
--- /dev/null
+++ b/README.md
@@ -0,0 +1,218 @@
+
+# Kavenegar-Laravel
+
+# Kavenegar RESTful API Document
+If you need to future information about API document Please visit RESTful Document
+
+## Installation
+
+First of all, You need to make an account on Kavenegar from Here
+
+
+After that you just need to pick API-KEY up from My Account section.
+
+
+
+Use in these ways :
+
+```php
+composer require h-o-sein/kavenegar-laravel
+```
+
+or add
+
+```php
+"kavenegar/php": "*"
+```
+And run following command to download extension using **composer**
+
+
+```php
+$ composer update
+```
+
+
+Usage
+-----
+
+Well, There is an example to Send SMS by PHP.
+
+```php
+require __DIR__ . '/vendor/autoload.php';
+
+try{
+ $api = new \Kavenegar\KavenegarApi( "API Key" );
+ $sender = "10004346";
+ $message = "خدمات پیام کوتاه کاوه نگار";
+ $receptor = array("09123456789","09367891011");
+ $result = $api->Send($sender,$receptor,$message);
+ if($result){
+ foreach($result as $r){
+ echo "messageid = $r->messageid";
+ echo "message = $r->message";
+ echo "status = $r->status";
+ echo "statustext = $r->statustext";
+ echo "sender = $r->sender";
+ echo "receptor = $r->receptor";
+ echo "date = $r->date";
+ echo "cost = $r->cost";
+ }
+ }
+}
+catch(\Kavenegar\Exceptions\ApiException $e){
+ // در صورتی که خروجی وب سرویس 200 نباشد این خطا رخ می دهد
+ echo $e->errorMessage();
+}
+catch(\Kavenegar\Exceptions\HttpException $e){
+ // در زمانی که مشکلی در برقرای ارتباط با وب سرویس وجود داشته باشد این خطا رخ می دهد
+ echo $e->errorMessage();
+}
+
+/*
+sample output
+{
+ "return":
+ {
+ "status":200,
+ "message":"تایید شد"
+ },
+ "entries":
+ [
+ {
+ "messageid":8792343,
+ "message":"خدمات پیام کوتاه کاوه نگار",
+ "status":1,
+ "statustext":"در صف ارسال",
+ "sender":"10004346",
+ "receptor":"09123456789",
+ "date":1356619709,
+ "cost":120
+ },
+ {
+ "messageid":8792344,
+ "message":"خدمات پیام کوتاه کاوه نگار",
+ "status":1,
+ "statustext":"در صف ارسال",
+ "sender":"10004346",
+ "receptor":"09367891011",
+ "date":1356619709,
+ "cost":120
+ }
+ ]
+}
+*/
+```
+
+Also you can use KavengarChannel for your notification:
+
+create your notification:
+``
+php artisan make:notification InvoicePaid
+``
+
+extend your notification from KavenegarBaseNotification:
+
+```php
+class InvoicePaid extends KavenegarBaseNotification
+{
+
+}
+```
+overide the toKavengar function:
+ ````php
+ class InvoicePaid extends KavenegarBaseNotification
+ {
+
+ public function __construct(Invoice $invoice)
+ {
+ $this->invoice = $invoice;
+ }
+
+ public function toKavenegar($notifiable)
+ {
+ return (new KavenegarMessage("فاکتور شما به شماره $invoice->id پرداخت شد."))->from('10004346');
+ }
+ }
+````
+you should add Notifiable trait and routeNotificationForKavenegar method in your model
+
+````php
+class User extends Authenticatable
+{
+ use Notifiable;
+
+ public function routeNotificationForKavenegar($driver, $notification = null)
+ {
+ return $this->mobile;
+ }
+
+}
+````
+Notice: if you don't add routeNotificationForKavenegar in your notifiable model then you should set your receiver in your notification :
+````php
+class InvoicePaid extends KavenegarBaseNotification
+{
+
+ public function toKavenegar($notifiable)
+ {
+ return (new KavenegarMessage('فاکتور شما به شماره ۱۲۳۴ پرداخت شد.'))->from('10004346')->to('092100000');
+ }
+}
+````
+for send verify lookup message you should use verifyLookup method for set method name and tokens:
+
+````php
+class InvoicePaid extends KavenegarBaseNotification
+{
+
+ public function toKavenegar($notifiable)
+ {
+ return (new KavenegarMessage())
+ ->verifyLookup('verify_first',['token1','token2']);
+ }
+}
+````
+
+
+## Contribution
+
+Bug fixes, docs, and enhancements welcome! Please let us know support@kavenegar.com
+
+
+
+
+
+## راهنما
+
+### معرفی سرویس کاوه نگار
+
+کاوه نگار یک وب سرویس ارسال و دریافت پیامک و تماس صوتی است که به راحتی میتوانید از آن استفاده نمایید.
+
+### ساخت حساب کاربری
+
+اگر در وب سرویس کاوه نگار عضو نیستید میتوانید از [لینک عضویت](http://panel.kavenegar.com/client/membership/register) ثبت نام و اکانت آزمایشی برای تست API دریافت نمایید.
+
+### مستندات
+
+برای مشاهده اطلاعات کامل مستندات [وب سرویس پیامک](http://kavenegar.com/وب-سرویس-پیامک.html) به صفحه [مستندات وب سرویس](http://kavenegar.com/rest.html) مراجعه نمایید.
+
+### راهنمای فارسی
+
+در صورتی که مایل هستید راهنمای فارسی کیت توسعه کاوه نگار را مطالعه کنید به صفحه [کد ارسال پیامک](http://kavenegar.com/sdk.html) مراجعه نمایید.
+
+### اطالاعات بیشتر
+برای مطالعه بیشتر به صفحه معرفی
+[وب سرویس اس ام اس ](http://kavenegar.com)
+کاوه نگار
+مراجعه نمایید .
+
+ اگر در استفاده از کیت های سرویس کاوه نگار مشکلی یا پیشنهادی داشتید ما را با یک Pull Request یا ارسال ایمیل به support@kavenegar.com خوشحال کنید.
+
+##
+
+
+[http://kavenegar.com](http://kavenegar.com)
+
+
+
+
diff --git a/composer.json b/composer.json
new file mode 100644
index 0000000..03a1dd1
--- /dev/null
+++ b/composer.json
@@ -0,0 +1,36 @@
+{
+ "name":"h-o-sein/kavenegar-laravel",
+ "description":"Laravel 8 Kavenegar integration",
+ "type":"laravel-package",
+ "keywords":[
+ "laravel",
+ "kavenegar",
+ "sms",
+ "api"
+ ],
+ "license":"MIT",
+ "authors":[
+ {
+ "name":"Kavenegar API Team",
+ "email":"support@kavenegar.com"
+ }
+ ],
+ "require":{
+ "kavenegar/php":"*"
+ },
+ "autoload":{
+ "psr-4":{
+ "Kavenegar\\Laravel\\":"src/"
+ }
+ },
+ "extra": {
+ "laravel": {
+ "providers": [
+ "Kavenegar\\Laravel\\ServiceProvider"
+ ],
+ "aliases": {
+ "Kavenegar":"Kavenegar\\Laravel\\Facade"
+ }
+ }
+ }
+}
diff --git a/src/Facade.php b/src/Facade.php
new file mode 100644
index 0000000..753e413
--- /dev/null
+++ b/src/Facade.php
@@ -0,0 +1,16 @@
+provider = $this->getProvider();
+ }
+
+ /**
+ * Bootstrap the application events.
+ *
+ * @return void
+ */
+ public function boot()
+ {
+ return $this->provider->boot();
+ }
+
+ /**
+ * Register the service provider.
+ *
+ * @return void
+ */
+ public function register()
+ {
+ return $this->provider->register();
+ }
+
+ /**
+ * Return the service provider for the particular Laravel version.
+ *
+ * @return mixed
+ */
+ private function getProvider()
+ {
+ $app = $this->app;
+
+ $version = intval($app::VERSION);
+
+ switch ($version) {
+ case 4:
+ return new ServiceProviderLaravel4($app);
+
+ case 5:
+ return new ServiceProviderLaravel5($app);
+
+ case 6:
+ return new ServiceProviderLaravel6($app);
+
+ case 7:
+ return new ServiceProviderLaravel7($app);
+
+ case 8:
+ return new ServiceProviderLaravel8($app);
+ default:
+ throw new RuntimeException('Your version of Laravel is not supported');
+ }
+ }
+
+ /**
+ * Get the services provided by the provider.
+ *
+ * @return array
+ */
+ public function provides()
+ {
+ return ['kavenegar'];
+ }
+}
diff --git a/src/ServiceProviderLaravel4.php b/src/ServiceProviderLaravel4.php
new file mode 100644
index 0000000..32fe07e
--- /dev/null
+++ b/src/ServiceProviderLaravel4.php
@@ -0,0 +1,28 @@
+package('kavenegar/laravel', null, __DIR__);
+ }
+
+ /**
+ * Register the service provider.
+ *
+ * @return void
+ */
+ public function register()
+ {
+ $this->app['kavenegar'] = $this->app->share(function ($app) {
+ return new \Kavenegar\KavenegarApi($app['config']->get('kavenegar::apikey'));
+ });
+ }
+}
diff --git a/src/ServiceProviderLaravel5.php b/src/ServiceProviderLaravel5.php
new file mode 100644
index 0000000..17ff8e8
--- /dev/null
+++ b/src/ServiceProviderLaravel5.php
@@ -0,0 +1,27 @@
+publishes([__DIR__ . '/config/config.php' => config_path('kavenegar.php')]);
+ }
+ /**
+ * Register the service provider.
+ *
+ * @return void
+ */
+ public function register()
+ {
+ $this->mergeConfigFrom(__DIR__ . '/config/config.php', 'kavenegar');
+ $this->app->singleton('kavenegar', function ($app) {
+ return new KavenegarApi($app['config']->get('kavenegar.apikey'));
+ });
+ }
+}
diff --git a/src/ServiceProviderLaravel6.php b/src/ServiceProviderLaravel6.php
new file mode 100644
index 0000000..77d5847
--- /dev/null
+++ b/src/ServiceProviderLaravel6.php
@@ -0,0 +1,37 @@
+publishes([__DIR__ . '/config/config.php' => config_path('kavenegar.php')]);
+ }
+ /**
+ * Register the service provider.
+ *
+ * @return void
+ */
+ public function register()
+ {
+ $this->mergeConfigFrom(__DIR__ . '/config/config.php', 'kavenegar');
+ $this->app->singleton('kavenegar', function ($app) {
+ return new KavenegarApi($app['config']->get('kavenegar.apikey'));
+ });
+ Notification::resolved(function ($service) {
+ $service->extend('kavenegar', function ($app) {
+ return new \Kavenegar\Laravel\Channel\KavenegarChannel($app->make('kavenegar'));
+ });
+ });
+ }
+}
diff --git a/src/ServiceProviderLaravel7.php b/src/ServiceProviderLaravel7.php
new file mode 100644
index 0000000..69b34bb
--- /dev/null
+++ b/src/ServiceProviderLaravel7.php
@@ -0,0 +1,37 @@
+publishes([__DIR__ . '/config/config.php' => config_path('kavenegar.php')]);
+ }
+ /**
+ * Register the service provider.
+ *
+ * @return void
+ */
+ public function register()
+ {
+ $this->mergeConfigFrom(__DIR__ . '/config/config.php', 'kavenegar');
+ $this->app->singleton('kavenegar', function ($app) {
+ return new KavenegarApi($app['config']->get('kavenegar.apikey'));
+ });
+ Notification::resolved(function ($service) {
+ $service->extend('kavenegar', function ($app) {
+ return new \Kavenegar\Laravel\Channel\KavenegarChannel($app->make('kavenegar'));
+ });
+ });
+ }
+}
diff --git a/src/ServiceProviderLaravel8.php b/src/ServiceProviderLaravel8.php
new file mode 100644
index 0000000..0a754af
--- /dev/null
+++ b/src/ServiceProviderLaravel8.php
@@ -0,0 +1,37 @@
+publishes([__DIR__ . '/config/config.php' => config_path('kavenegar.php')]);
+ }
+ /**
+ * Register the service provider.
+ *
+ * @return void
+ */
+ public function register()
+ {
+ $this->mergeConfigFrom(__DIR__ . '/config/config.php', 'kavenegar');
+ $this->app->singleton('kavenegar', function ($app) {
+ return new KavenegarApi($app['config']->get('kavenegar.apikey'));
+ });
+ Notification::resolved(function ($service) {
+ $service->extend('kavenegar', function ($app) {
+ return new \Kavenegar\Laravel\Channel\KavenegarChannel($app->make('kavenegar'));
+ });
+ });
+ }
+}
diff --git a/src/channel/KavenegarChannel.php b/src/channel/KavenegarChannel.php
new file mode 100644
index 0000000..6728deb
--- /dev/null
+++ b/src/channel/KavenegarChannel.php
@@ -0,0 +1,65 @@
+from = $from;
+ $this->kavenegar = $kavenegar;
+ }
+
+ /**
+ * Send the given notification.
+ *
+ * @param mixed $notifiable
+ * @param \Illuminate\Notifications\Notification $notification
+ * @return \Kavenegar\Laravel\Message\KavenegarMessage
+ */
+ public function send($notifiable, $notification)
+ {
+ $message = $notification->toKavenegar($notifiable);
+
+ $message->to($message->to ?: $notifiable->routeNotificationFor('kavenegar', $notification));
+ if (!$message->to || !($message->from || $message->method)) {
+ return;
+ }
+
+ return $message->method ?
+ $this->verifyLookup($message) :
+ Kavenegar::Send($message->from, $message->to, $message->content);
+ }
+
+ public function verifyLookup(KavenegarMessage $message)
+ {
+ $token2 = isset($message->tokens[1]) ? $message->tokens[1] : null;
+ $token3 = isset($message->tokens[2]) ? $message->tokens[2] : null;
+ return Kavenegar::VerifyLookup($message->to, $message->tokens[0], $token2, $token3, $message->method);
+ }
+}
diff --git a/src/config/.gitkeep b/src/config/.gitkeep
new file mode 100644
index 0000000..e69de29
diff --git a/src/config/config.php b/src/config/config.php
new file mode 100644
index 0000000..2cdb4e1
--- /dev/null
+++ b/src/config/config.php
@@ -0,0 +1,4 @@
+ '',
+];
\ No newline at end of file
diff --git a/src/message/KavenegarMessage.php b/src/message/KavenegarMessage.php
new file mode 100644
index 0000000..ebb2277
--- /dev/null
+++ b/src/message/KavenegarMessage.php
@@ -0,0 +1,115 @@
+content = $content;
+ }
+
+ /**
+ * Set the message content.
+ *
+ * @param string $content
+ * @return $this
+ */
+ public function content($content)
+ {
+ $this->content = $content;
+
+ return $this;
+ }
+
+ /**
+ * Set the phone number the message should be sent from.
+ *
+ * @param string $from
+ * @return $this
+ */
+ public function from($from)
+ {
+ $this->from = $from;
+
+ return $this;
+ }
+
+ /**
+ * Set the phone number the message should be received to.
+ *
+ * @param string $to
+ * @return $this
+ */
+ public function to($to)
+ {
+ $this->to = $to;
+
+ return $this;
+ }
+
+
+ /**
+ * Set the verifing lookup method that the message should be sent from.
+ *
+ * @param string $method
+ * @param array $tokens
+ * @return $this
+ */
+ public function verifyLookup($method, $tokens)
+ {
+ $this->method = $method;
+ $this->tokens = is_array($tokens) ? $tokens : [$tokens];
+ return $this;
+ }
+
+}
diff --git a/src/notification/KavenegarBaseNotification.php b/src/notification/KavenegarBaseNotification.php
new file mode 100644
index 0000000..38267c0
--- /dev/null
+++ b/src/notification/KavenegarBaseNotification.php
@@ -0,0 +1,49 @@
+