-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: remove explicit GoogleClient::class dependency in GoogleApi…
…Manager
- Loading branch information
Showing
2 changed files
with
8 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -128,11 +128,9 @@ This package includes a Google `Calendar` and `Gmail` adapter classes. Feel free | |
> Using the client to create a calendar event for the following day 1:00PM. | ||
```php | ||
public function add(GoogleClient $client) | ||
public function add() | ||
{ | ||
$calendar = GoogleApi::calendar($client); | ||
|
||
$calendar->setCalendarId('[email protected]'); | ||
$calendar = GoogleApi::calendar()->setCalendarId('[email protected]'); | ||
|
||
$summary = 'Test Event'; | ||
$location = '123 Test St, Test City, TS'; | ||
|
@@ -150,7 +148,7 @@ This package includes a Google `Calendar` and `Gmail` adapter classes. Feel free | |
> Using the client to send emails. | ||
```php | ||
public function mount(GoogleClient $client, Order $id) | ||
public function mount(Order $id) | ||
{ | ||
$model = Order::with(['user'])->where('id', $id)->first(); | ||
|
||
|
@@ -159,7 +157,7 @@ This package includes a Google `Calendar` and `Gmail` adapter classes. Feel free | |
storage_path('app/public/invoice.pdf'), | ||
]; | ||
|
||
$gmail = GoogleApi::gmail($client); | ||
$gmail = GoogleApi::gmail(); | ||
$gmail->from('[email protected]', 'Company Name'); | ||
$gmail->to($model->user->email, $model->user->name); | ||
$gmail->cc('[email protected]'); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters