-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit dce42a3
Showing
7 changed files
with
406 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Laravel Zain | ||
|
||
Zain DSP API integration with laravel | ||
|
||
## Documentation coming soon |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"name": "alkhatibdev/laravel-zain", | ||
"description": "Zain DSP API integration", | ||
"type": "package", | ||
"license": "MIT", | ||
"authors": [ | ||
{ | ||
"name": "AlkhatibHamad", | ||
"email": "alkhatib.hamad@gmail.com" | ||
} | ||
], | ||
"minimum-stability": "dev", | ||
"require": {}, | ||
"autoload": { | ||
"psr-4": { | ||
"AlkhatibDev\\LaravelZain\\": "src/" | ||
} | ||
}, | ||
"extra": { | ||
"laravel": { | ||
"providers": [ | ||
"AlkhatibDev\\LaravelZain\\LaravelZainServiceProvider" | ||
] | ||
|
||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?php | ||
|
||
return [ | ||
|
||
'base_url' => env('ZAIN_SERVER_BASE_API_URL'), | ||
|
||
'product_code' => env('ZAIN_PRODUCT_CODE'), | ||
|
||
'username' => env('ZAIN_USERNAME'), | ||
|
||
'password' => env('ZAIN_PASSWORD'), | ||
|
||
'remember_token' => env('ZAIN_REMEMBER_TOKEN', false), | ||
|
||
'enable_logging' => false, | ||
|
||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?php | ||
|
||
namespace AlkhatibDev\LaravelZain\Exceptions; | ||
|
||
use Exception; | ||
|
||
class InvlalidConfigsValuesException extends Exception {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
|
||
namespace AlkhatibDev\LaravelZain\Facades; | ||
|
||
use Illuminate\Support\Facades\Facade; | ||
|
||
class Zain extends Facade { | ||
|
||
/** | ||
* Get the registered name of the component. | ||
* | ||
* @return string | ||
*/ | ||
protected static function getFacadeAccessor() | ||
{ | ||
return 'Zain'; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<?php | ||
|
||
namespace AlkhatibDev\LaravelZain; | ||
|
||
use Illuminate\Support\ServiceProvider; | ||
|
||
class LaravelZainServiceProvider extends ServiceProvider { | ||
|
||
/** | ||
* Register any application services. | ||
* | ||
* @return void | ||
*/ | ||
public function register() | ||
{ | ||
|
||
$this->app->singleton('Zain', function ($app) { | ||
return new \AlkhatibDev\LaravelZain\Zain(); | ||
}); | ||
|
||
} | ||
|
||
/** | ||
* Bootstrap any application services. | ||
* | ||
* @return void | ||
*/ | ||
public function boot() | ||
{ | ||
$this->publishResources(); | ||
} | ||
|
||
protected function publishResources() | ||
{ | ||
// Publish Configs | ||
$this->publishes([ | ||
__DIR__.'/../config/laravel-zain.php' => config_path('laravel-zain.php'), | ||
], 'laravel-zain-config'); | ||
} | ||
|
||
} |
Oops, something went wrong.