Posts

Showing posts with the label Fetch Data

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 10 - Fetch data from Firebase performing Simple and compound queries using Laravel PHP

Image
In this chapter, we will learn how to can fetch data from Firebase Cloud Firestore by performing simple and compound queries using Laravel PHP package. Consider the list of Student in Firebase Cloud Firestore. We would fetch these student data using all example of queries. Fetch the normal list $students = app('firebase.firestore')->database()->collection('Student')->documents(); print_r('Total records: '.$students->size()); foreach($students as $stu) { if($stu->exists()){ print_r('Student ID = '.$stu->id()); print_r('Student Name = '.$stu->data()['name']); } } Now search query, search by name in student list $students = app('firebase.firestore')->database()->collection('Student')->documents() ->where('name','==','John Doe'); Remember there is no...