change namespace and cleanup code

This commit is contained in:
2022-05-14 18:21:55 +02:00
parent 76edd961b7
commit 377dc53037
46 changed files with 400 additions and 360 deletions

View File

@@ -26,7 +26,7 @@ composer require ghostzero/bitinflow-accounts
Add Service Provider to your `app.php` configuration file:
```php
GhostZero\BitinflowAccounts\Providers\BitinflowAccountsServiceProvider::class,
Bitinflow\Accounts\Providers\BitinflowAccountsServiceProvider::class,
```
## Event Listener
@@ -56,7 +56,7 @@ protected $listen = [
Copy configuration to config folder:
```
$ php artisan vendor:publish --provider="GhostZero\BitinflowAccounts\Providers\BitinflowAccountsServiceProvider"
$ php artisan vendor:publish --provider="Bitinflow\Accounts\Providers\BitinflowAccountsServiceProvider"
```
Add environmental variables to your `.env`
@@ -84,7 +84,7 @@ You will need to add an entry to the services configuration file so that after c
#### Basic
```php
$bitinflowAccounts = new GhostZero\BitinflowAccounts\BitinflowAccounts();
$bitinflowAccounts = new Bitinflow\Accounts\BitinflowAccounts();
$bitinflowAccounts->setClientId('abc123');
@@ -105,7 +105,7 @@ echo $sshKey->name;
#### Setters
```php
$bitinflowAccounts = new GhostZero\BitinflowAccounts\BitinflowAccounts();
$bitinflowAccounts = new Bitinflow\Accounts\BitinflowAccounts();
$bitinflowAccounts->setClientId('abc123');
$bitinflowAccounts->setClientSecret('abc456');
@@ -119,7 +119,7 @@ $bitinflowAccounts = $bitinflowAccounts->withToken('abcdef123456');
#### OAuth Tokens
```php
$bitinflowAccounts = new GhostZero\BitinflowAccounts\BitinflowAccounts();
$bitinflowAccounts = new Bitinflow\Accounts\BitinflowAccounts();
$bitinflowAccounts->setClientId('abc123');
$bitinflowAccounts->setToken('abcdef123456');
@@ -142,7 +142,7 @@ $result = $bitinflowAccounts->withToken('uvwxyz456789')->getAuthedUser();
#### Facade
```php
use GhostZero\BitinflowAccounts\Facades\BitinflowAccounts;
use Bitinflow\Accounts\Facades\BitinflowAccounts;
BitinflowAccounts::withClientId('abc123')->withToken('abcdef123456')->getAuthedUser();
```