diff --git a/README.md b/README.md index 63d4e22..ed9a5c4 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ The BMail package allows you to send email templates on Laravel to the Bluescale ## Usage -In your composer.json, add : +First in your composer.json, add : ```bash "require": { @@ -23,16 +23,23 @@ and ] ``` -Then update your package file : +Next update your package : ```bash -composer update bluescale/laravel-mail +composer update bluescale/laravel-bmail ``` -Finally publish the assets from your provider : +Then publish the assets from your provider : ```bash php artisan vendor:publish ``` +Finally add your API key in the .env : + +```bash +BMAIL_API_KEY=your_key +BMAIL_API_URL=the_api_url +``` + diff --git a/config/bmail.php b/config/bmail.php index b46bd67..80a3ec7 100644 --- a/config/bmail.php +++ b/config/bmail.php @@ -2,6 +2,7 @@ return [ - 'bmail' => env('BMAIL_KEY', null) + 'api_key' => env('BMAIL_API_KEY', null), + 'api_url' => env('BMAIL_API_URL', null) ]; diff --git a/src/BMailApi.php b/src/BMailApi.php index 8232742..58547d0 100644 --- a/src/BMailApi.php +++ b/src/BMailApi.php @@ -22,10 +22,7 @@ class BMailApi public function send($template) { - $url = "http://127.0.0.1:9000/api/project/template/send"; - - // TODO -// $url = "http://127.0.0.1:9000/api/project/template/send"; + $url = config('bmail.api_url'); $client = new Client();