laravel-firebase icon indicating copy to clipboard operation
laravel-firebase copied to clipboard

Eloquent model for firebase

Open javiervelaz opened this issue 8 years ago • 0 comments

Could you give some example? how modeling a firebase collecion inside the model file?

I did this in model/comment.php

class comment extends Eloquent{ protected $table = 'comment'; protected $primaryKey = 'id'; protected $connection = 'firebase'; }

database.php 'firebase' => array( 'host' => 'https://mydb.firebaseio.com/', 'token' => 'kadksakdlaskdsioiei203222kl2k3223', 'timeout' => 10, 'sync' => true, // OPTIONAL: auto-sync all Eloquent models with Firebase? )

javiervelaz avatar Mar 20 '16 15:03 javiervelaz