** this is my config/firebase.php file**
<?php
class firebase{
public function __construct($config = array())
{
$config['firebase_app_key'] = __DIR__ . '/../config/gfgh-6bbd-firebase-adminsdk-fivu8-11536116hw5.json';
}
}
?>
**this is my model**
<?php
require '/vendor/autoload.php';
use KreaitFirebaseFactory;
class Login_model extends CI_Model
{
public function __construct()
{
parent::__construct();
$factory = (new Factory())
->withServiceAccount('gfgh-6bbd-firebase-adminsdk-fivu8-11536116hw5.json')
->createFirestore();
$this->db = $factory->database();
}
function get_data()
{
$document = $this->db->get();
return $document;
}
}
** i want to insert and update data in firebase **
i am gettingthis error- Your C:xampphtdocssolverapplicationconfig/firebase.php file does not appear to contain a valid configuration array.