In this tutorial I will show you two days to check if a given date is today’s date in Laravel. These 2 methods are isToday method and isSameDay method of Carbon library class in Laravel. First Method: Using IsToday() In…
PHP example of Null coalescing operator for shorthand If-Else operator
In this example we will see the use of the shortest shorthand of if-else statement to check isset variable in PHP programming language. Using Null coalescing operator we can write shortest if-else statement to check isset value and return it…
Example of Eloquent Model Query with conditional Where condition in Laravel
In this example I will show you how to build an Eloquent query to filter results by certain field or fields of a table. In this example we will use simple Laravel Eloquent Model example to search a table and…
How to Reinstall Pods in a Expo React native bare project in MacOS
Cocoapod is a package dependency manager for Objective-C and Swift projects with XCode. In a expo bare development environment you may need to re-install Cocoapods or in short Pods occasionally. In this tutorial I will show you the proper way…
How to install LEMP stack on Ubuntu 22.04 LTS
Ubuntu is one the most popular Linux distributions. Ubuntu is a free and open-source software based on Debian. In this simple I will walk you through the whole process to install a LEMP stack (Linux, Ngnix, MySQL/Maridb & PHP) which…
How to use cURL in PHP, Working examples of cURL in PHP
What is cURL? cURL is a computer software project providing a code library (libcurl) and command-line tool (curl) for transferring data using various network protocols. Usually PHP comes loaded with libcurl library by default. Check if cURL is enabled in…
How to Find and Kill a Process Running on Specific Port
“A process in Linux is nothing but a program in execution. It’s a running instance of a program. Any command that you execute starts a process.” – DigitalOcean How to Kill a Process The Linux operating system considers every running…
How to check if a string is a valid JSON object in PHP
You receive a data in form of string and it is supposed to be a valid JSON. So how to know whether a string you have is a valid JSON object. Here in this post I will show it with…
How to validate exact words in an input value in Laravel?
Validate exact words: This post will show you how to validate a string by exact matching with a string. For example you have to validate a field for whether it has yes or no in an input. So the input…
How to copy files and folders between two servers via SCP
As an internet user you need to download and upload data in form of files everyday. Also, as an mobile and/or web app developer you must have used FTP (File Transfer Protocol) to transfer data from one machine to another…