Skip to content

Commit

Permalink
replace env with config
Browse files Browse the repository at this point in the history
  • Loading branch information
eugenefvdm committed Oct 19, 2024
1 parent 5570943 commit 913a36e
Showing 1 changed file with 22 additions and 9 deletions.
31 changes: 22 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,26 @@ Requirements:

```bash
composer require eugenefvdm/whmcs-api
cp .env.example .env
```

## Environment settings
Publish the configuration file:

```dotenv
WHMCS_URL=
WHMCS_API_IDENTIFIER=
WHMCS_API_SECRET=
WHMCS_LIMITNUM=
WHMCS_DEBUG=
```bash
php artisan vendor:publish --provider="Eugenefvdm\Whmcs\WhmcsServiceProvider"
```

## Configuration Settings `whmcs.php`

```php
<?php

return [
'url' => env('WHMCS_URL'),
'api_identifier' => env('WHMCS_API_IDENTIFIER'),
'api_secret' => env('WHMCS_API_SECRET'),
'limitnum' => env('WHMCS_LIMITNUM', 10000),
'debug' => env('WHMCS_DEBUG'),
];
```

`WHMCS_URL` should be without the trialing slash.
Expand Down Expand Up @@ -194,7 +203,11 @@ A new package is applied to the service. If the package is linked to an API, the

# Testing

Before testing, please ensure you have copied over the `.env.example` file to `.env`.
Before testing, please ensure you have copied over the `.env.example` file to `.env` as the tests use `dotenv`.

```bash
cp .env.example .env
```

## Debugging

Expand Down

0 comments on commit 913a36e

Please sign in to comment.