API Reference
Barta Facade
Section titled “Barta Facade”| Method | Returns | Description |
|---|---|---|
driver(?string) | AbstractDriver | Get driver |
to(string|array) | self | Set recipient(s) |
message(string) | self | Set content |
send() | ResponseData | Send now |
queue(?string, ?string) | PendingDispatch | Queue |
extend(string, Closure) | void | Register driver |
ResponseData
Section titled “ResponseData”| Property | Type | Description |
|---|---|---|
$success | bool | Succeeded |
$data | array | API response |
$errors | array | Errors |
| Method | Returns |
|---|---|
toArray() | array |
BartaException
Section titled “BartaException”| Method | Description |
|---|---|
invalidNumber(string) | Invalid phone |
missingRecipient() | No recipient |
missingMessage() | No message |
| Method | Returns |
|---|---|
formatPhoneNumber(string) | string |