Skip to content

alkurn/yii2-firebase

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Firebase Helper for Yii2

Yii2 helper for creating firebase connection on real time.

Installation

The preferred way to install this extension is through composer.

  • Either run
php composer.phar require --prefer-dist alkurn/yii2-firebase "dev-master"

or add

"alkurn/yii2-firebase":"dev-master"

to the require section of your application's composer.json file.

  • Add a new component in components section of your application's configuration file (optional), for example:
'components' => [
    'firebase' => [
            'class' => 'alkurn\firebase\Firebase',
            'credential_file' => 'uploads/firebase-credential.json',
            'database_uri' => 'https://firebase-db.firebaseio.com', // (optional)
        ], 
],

and in bootstrap section, for example:

'bootstrap' => ['log','firebase'],

It is necessary if you want to set global helper's settings for the application.

Usage

For example:

$db = Yii::$app->firebase->getDatabase();

Releases

No releases published

Packages

No packages published

Languages