| Package Data | |
|---|---|
| Maintainer Username: | uchm4n |
| Maintainer Contact: | ucha19871@gmail.com (ucha19871) |
| Package Create Date: | 2017-05-30 |
| Package Last Update: | 2017-06-02 |
| Home Page: | |
| Language: | PHP |
| License: | MIT |
| Last Refreshed: | 2025-11-06 15:06:55 |
| Package Statistics | |
|---|---|
| Total Downloads: | 575 |
| Monthly Downloads: | 0 |
| Daily Downloads: | 0 |
| Total Stars: | 6 |
| Total Watchers: | 3 |
| Total Forks: | 7 |
| Total Open Issues: | 1 |
composer require ucha19871/fb
After installing composer package, add the ServiceProvider to the providers array in config/app.php
Ucha19871\FB\FBServiceProvider::class,
Add this to your aliases for shorter code:
'FB' => Ucha19871\FB\Facades\FBFacades::class,
Insert the config settings in config/services.php like this:
'firebase' => [
'database_url' => 'https://PROJECT.firebaseio.com',
'secret' => 'KB2xZjJgAvmPROJECT8ykNrT6f2emuuaxJTr9',
]
You can get Firebase
secrettoken like so:
- click on the gear icon in you Firebase Console
- Click Project settings
- Click on the Service Account tab
- Click on the Database Secrets link in the inner left-nav
- Hover over the non-displayed secret and click Show
$data = ['key' => 'data' , 'key1' => 'data1']
FB::set('/test/',$data);
FB::get('/test/',['print'=> 'pretty']);
FB::push('/test/',$data);
FB::update('/test/',['key1' => 'Updating data by key']);
FB::delete('/test/');
For more options see firebase REST documentation