Posts

Showing posts with the label Kreait Packages

Chapter 5 - Integrate Laravel with Google Firebase connecting Cloud Firestore

Image
In this chapter, we will create a Laravel project and connect it with the Cloud Firestore with installing all necessary packages and build some basic queries. Step 1: Install a fresh Laravel Project with name my-project composer create-project --prefer-dist laravel/laravel my-project Step 2: Setup a Firebase account and Cloud Firestore Database A detail chapter on this topic is available here  https://laravelwithfirebase.blogspot.com/2020/02/chapter-3-creating-project-in-firebase-for-laravel-php.html Step 3: Use the Laravel package built over Firebase PHP Admin SDK by Kreait The package url on Github: https://github.com/kreait/laravel-firebase. We have already explain the Firebase PHP Admin SDK in previous chapters by the same Author. So this code has been used by lot of people and is highly maintainable. Run the following command to install the package. composer require kreait/laravel-firebase ...

How to add Laravel package for the Firebase PHP Admin SDK #4

Image
Learn how to add firebase admin sdk to laravel project - php. In this chapter, we will introduce you to SDK built by Kreait ( https://github.com/kreait ). Note this is not official SDK by Firebase. But the most used (1.4M downloads and 1.1K Stars) and maintainable code. Note we are going to use the Laravel - Firebase package built on above it  https://github.com/kreait/laravel-firebase  and Google Firestore PHP SDK   https://github.com/googleapis/google-cloud-php-firestore . So if you want to start building Laravel app, you can jump to related chapter but understanding base code is always necessary. So lets begin. The official document url is https://firebase-php.readthedocs.io/ and github url is  https://github.com/kreait/firebase-php . The minimum requirement of PHP for this package >= 7.0 mbstring, composer and the firebase json credential file explained in before chapters. Installation can be done in your PHP project through composer comp...