Skip to content

Commit 88f96c7

Browse files
committed
Update README
1 parent b392200 commit 88f96c7

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

README.md

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,15 @@ A Laravel package for the [Firebase PHP Admin SDK](https://github.com/kreait/fir
77
[![Total Downloads](https://img.shields.io/packagist/dt/kreait/laravel-firebase.svg)](https://packagist.org/packages/kreait/laravel-firebase/stats)
88
[![Tests](https://github.com/kreait/laravel-firebase/workflows/Tests/badge.svg?branch=main)](https://github.com/kreait/laravel-firebase/actions)
99
[![codecov](https://codecov.io/gh/kreait/laravel-firebase/branch/main/graph/badge.svg)](https://codecov.io/gh/kreait/laravel-firebase)
10-
[![Discord](https://img.shields.io/discord/523866370778333184.svg?color=7289da&logo=discord)](https://discord.gg/nbgVfty)
1110
[![Sponsor](https://img.shields.io/static/v1?logo=GitHub&label=Sponsor&message=%E2%9D%A4&color=ff69b4)](https://github.com/sponsors/jeromegamez)
1211

1312
- [Installation](#installation)
1413
- [Laravel](#laravel)
1514
- [Lumen](#lumen)
1615
- [Configuration](#configuration)
17-
- [Upgrading to version 3](#upgrade)
18-
- [Facades](UPGRADE.md#facades)
1916
- [Usage](#usage)
2017
- [Multiple projects](#multiple-projects)
18+
- [Upgrading](UPGRADE.md)
2119
- [Support](#support)
2220
- [License](#license)
2321

@@ -116,15 +114,16 @@ done for you with the Laravel Service Provider. Use Dependency Injection, the Fa
116114

117115
Multiple projects can be configured in [config/firebase.php](config/firebase.php) by adding another section to the projects array.
118116

119-
When accessing components, the facade uses the default project. One can also explicitly use a project:
117+
When accessing components, the facade uses the default project. You can also explicitly use a project:
120118

121119
```php
122-
Firebase::auth() // returns an intance of \Kreait\Firebase\Auth with the configuration found for the default project
123-
// or
124-
// 'app' is configured as the default project by default, this would be equivalent to Firebase::firestore() when that is the case
125-
Firebase::project('app')->firestore() // returns an intance of \Kreait\Firebase\Firestore with the configuration found for the 'app' project
126-
// or
127-
Firebase::project('secondary-app')->database() // returns an instance of \Kreait\Firebase\Database with the configuration found for the 'secondary-app' project
120+
use Kreait\Laravel\Firebase\Facades\Firebase;
121+
122+
// Return an instance of the Auth component for the default Firebase project
123+
$defaultAuth = Firebase::auth();
124+
// Return an instance of the Auth component for a specific Firebase project
125+
$appAuth = Firebase::project('app')->auth();
126+
$anotherAppAuth = Firebase::project('another-app')->auth();
128127
```
129128

130129
## Support

0 commit comments

Comments
 (0)