Posts

Showing posts with the label Google Cloud PHP Firestore SDK

How to make Firebase query search not case sensitive #18

Image
How to make Firebase query search not case sensitive because you know Firebase provide exact match "==" with case sensitive. So we will solve this issue in the chapter in detail. We will use the Laravel PHP SDK for the firebase for all the queries stuff. Also we will see case insensitive sorting with Firebase orderBy using Firebase search ignoring case. Now lets consider a simple example, you have 'Student' list and you want to search by name. So the main use of any search is that, you insert one or two characters and the system should search the most matching one, but that not the case in Firebase. Firebase is a case sensitive. Means string "Name" and "name" are two different values for Firebase. All Firebase developers are facing this issue, which is most basic necessity. So lets first understand, currently what is provided by Firebase. See the below example of Student List. Now here you see, we have a Student ...

How to make Firebase query search not case sensitive #18

Image
How to make Firebase query search not case sensitive because you know Firebase provide exact match "==" with case sensitive. So we will solve this issue in the chapter in detail. We will use the Laravel PHP SDK for the firebase for all the queries stuff. Also we will see case insensitive sorting with Firebase orderBy using Firebase search ignoring case. Now lets consider a simple example, you have 'Student' list and you want to search by name. So the main use of any search is that, you insert one or two characters and the system should search the most matching one, but that not the case in Firebase. Firebase is a case sensitive. Means string "Name" and "name" are two different values for Firebase. All Firebase developers are facing this issue, which is most basic necessity. So lets first understand, currently what is provided by Firebase. See the below example of Student List. Now here you see, we have a Student ...

How to Query based on multiple where clauses using eq filters in Firebase #17

Image
Learn how to Query based on multiple where clauses using eq filters in Firebase to perform simple and compound queries in Cloud Firestore. In this chapter, we will learn to query based on multiple where clauses in Firebase because you know Firebase provide exact match "==" with case sensitive. So we will solve this issue in the chapter in detail. We will use the Laravel PHP SDK for the firebase for all the queries stuff. Now lets consider a simple example, you have 'Student' list and there are two fields 'firstname' and 'lastname' and you want to search in both fields at the same time. So the main use of any search is that, you insert one or two characters and the system should search the most matching one, but that not the case in Firebase. All Firebase developers are facing this issue, which is most basic necessity. So lets first understand, currently what is provided by Firebase. See the below example of Student List. Now here yo...

How to perform sql LIKE operation on Firebase in Laravel PHP #16

Image
How to perform the like queries on Firebase because you know Firebase provide exact match "==" with case sensitive. So we will solve this issue in the chapter in detail. We will use the Laravel PHP SDK for the firebase for all the queries stuff. Now lets consider a simple example, you have 'Student' list and you want to search by name. So the main use of any search is that, you insert one or two characters and the system should search the most matching one, but that not the case in Firebase. All Firebase developers are facing this issue, which is most basic necessity. So lets first understand, currently what is provided by Firebase. See the below example of Student List. Now here you see, we have a Student named 'Tim Dane'. Now you have to search this student from whole list, so you start time 'Tim', so atleast it should be match one matching word. So do Firebase return has "Tim Dane" on search of "...

Chapter 8 - Add data to Firebase using Laravel PHP

Image
In this chapter, we will learn how to insert data in Firebase Cloud Firestore from Laravel Firebase SDK demonstrating usage of various data types. Insert a simple student data in Student collection $stuRef = app('firebase.firestore')->database()->collection('Student')->newDocument(); $stuRef->set([ 'firstname' => 'John', 'lastname' => 'Doe', 'age' => 30 ]); Here firebase autoconsider the data type i.e firstname is string, lastname is string and age is number. Following are the example of sending different datatypes $docRef->set([ 'stringExample' => 'Hello World', 'booleanExample' => true, 'numberExample' => 3.14159265, 'timestampExample' => new \Google\Cloud\Core\Timestamp(new \DateTime(date('Y-m-d H:i:s', strtotime('2020-03-03 23:12:55')...

How to solve PHP cannot find php_grpc.dll extension in gRPC installation on windows #7

Image
How to install or enable the gRPC (php_grpc.dll) extension in PHP to meet requirement for Google Cloud PHP Firestore package in Windows and Linux Operating System. For Windows Platform: Visit the official PECL website  https://pecl.php.net/package/grpc  for downloading the gRPC dll file directly. (PECL is a repository for PHP Extensions, providing a directory of all known extensions and hosting facilities for downloading and development of PHP extensions.) Now you have to select latest version (in our case 1.27.0) and stable state and in the downloads section, you have to click of DLL link On click of DLL link, you will have option of different php version Now you have to select as per your PC configuration and PHP version. The most default case will have 64 bit Thread Safe. So will click on link 7.4 Thread Safe (TS) x64. It will download a zip folder name "php_grpc-1.27.0...