ucha19871/fb

Firebase REST API easy wrapper for Laravel
575 5
Install
composer require ucha19871/fb
Latest Version:1.0.7
PHP:>=7.1
Laravel:5
License:MIT
Last Updated:Jun 2, 2017
Links: GitHub  ·  Packagist
Maintainer: uchm4n

Firebase easy REST API wrapper for Laravel

Latest Stable Version Total Downloads License

Installation

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 secret token 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

Usage

$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

Related Packages

eelkevdbos/firebase-php

Firebase php wrapper for REST API

29,507 75
luracast/restler

Restler is a simple and effective multi-format Web API Server framework written...

588,825 1,386
qbnk/restler

Fork of luracast/restler with own additions.

3,988
b3nl/laravel-rest-scaffolding

Generates basic routes and requests for REST APIs.

27 1
stevelacey/laravel-browsable-api

Browsable API for Laravel, based on Django REST Framework's Browsable API

20,196 7

Version History

Version Released PHP Laravel License
1.0.7 >=7.1 ^5.4 MIT