Modifying readme and api files

This commit is contained in:
Loann 2020-04-09 17:43:19 +02:00
parent e80f236ee6
commit 88eab63449
3 changed files with 14 additions and 9 deletions

View File

@ -4,7 +4,7 @@ The BMail package allows you to send email templates on Laravel to the Bluescale
## Usage ## Usage
In your composer.json, add : First in your composer.json, add :
```bash ```bash
"require": { "require": {
@ -23,16 +23,23 @@ and
] ]
``` ```
Then update your package file : Next update your package :
```bash ```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 ```bash
php artisan vendor:publish php artisan vendor:publish
``` ```
Finally add your API key in the .env :
```bash
BMAIL_API_KEY=your_key
BMAIL_API_URL=the_api_url
```

View File

@ -2,6 +2,7 @@
return [ return [
'bmail' => env('BMAIL_KEY', null) 'api_key' => env('BMAIL_API_KEY', null),
'api_url' => env('BMAIL_API_URL', null)
]; ];

View File

@ -22,10 +22,7 @@ class BMailApi
public function send($template) public function send($template)
{ {
$url = "http://127.0.0.1:9000/api/project/template/send"; $url = config('bmail.api_url');
// TODO
// $url = "http://127.0.0.1:9000/api/project/template/send";
$client = new Client(); $client = new Client();