Posts

Showing posts from August, 2020

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 ...

Chapter 20 - How to fetch and delete an image from Firebase Storage using Laravel PHP project

Image
In this chapter, we will learn how to fetch an image and delete an image from the Firebase Storage using the Laravel PHP project with the kreait/laravel-firebase package. First of all we assume that you have read our previous chapter on how to upload an image to the Firebase Storage from the Laravel PHP project using the kreait/laravel-firebase package. Chapter 19 In below example, we have "Students" folder in the root of the bucket. And inside the folder, we have a png image with document id of the student. So you have the path now "Students/defT5uT7SDu9K5RFtIdl.png" Now we will fetch the images from the path. And this can be achieved by following code $expiresAt = new \DateTime('today'); $imageReference = app('firebase.storage')->getBucket()->object("Students/defT5uT7SDu9K5RFtIdl.png"); if($imageReference->exists()) $image = $imageReference->signedUrl($expiresA...