Wednesday, 21st November 2018
21 November 2018

Laravel 5.6 – RealTime CRUD System Using Google Firebase

Today, we are share with you how to built real time CRUD system in laravel using google firebase. yes realtime insert, update, delete or listing is easily possible using google firebase database. in this article we are show to you step by step how to create google firebase database and how to integrate in your laravel application and how to built a realtime CRUD.

You can do many realtime programming stuff by google firebase. after you follow all step of this article then you got final output look like following screenshot.

Create New Project In Firebase:

Now, we are start step by step how to built realtime CRUD system using google firebase. so, first you should create one google firebase project. if you don’t know how to create google firebase project then visit this link  How to create google firebase project.

After create your google firebase project you must be get following things from your created project.

1.) api_key

2.) auth_domain

3.) database_url

4.) secret

5.) Legacy server key (Only use for notification)

This all things you got from your google firebase project easily

Configure Google Firebase Setting:

Now, we are configure google firebase setting in our laravel application. so, open config/services.php file and set following configuration in this file.

Create Route:

Now, create following route in your routes/web.php file. add following route in it.

Here, we are create one get route for user display view.

Add users Method in HomeController:

Now, we are add one users function app/Http/Controllers/HomeController.php file.

Create View File:

Now, we are create realtimecrud.blade.php in resources/views folder and add following bootstap code in this file for your design view.

After add this simple html code in your blade file but still it is not done. now we are add some google firebasejavascript code for built realtime CRUD. so, now add following js code in this file into the bottom

After add this javascript code in your blade file then your realtime crud system done successfully.

Now we are ready to run our example so run bellow command ro quick run:

Now you can open bellow URL on your browser:

Please also check our demo for realtime CRUD system.

Close