Laravel eloquent has many events such as retrieved, creating, created, updating, updated, saving, saved, deleting, deleted, restoring, restored and each event will be triggered at a particular moment in the model lifecycle. retrieved This event will dispatch…
Leave a CommentCategory: PHP / MySQL
In this tutorial, you will learn how easy it is to get data between two dates from the database using Laravel’s whereBetween method. Let’s say…
Leave a CommentDownloading images and files from the URL is simple and easy with Laravel’s Illuminate\Support\Facades\Storage; class. We gonna use file_get_contents function to reads the entire file into…
Leave a CommentIn this tutorial, you will learn how to write text to the existing pdf file in your Laravel application. We gonna write a simple PHP…
2 CommentsIn this tutorial, you will learn how to merge multiple pdf files in your Laravel application. We gonna write a simple PHP script to merge…
2 CommentsIn this CodeIgniter 4 tutorial, we gonna convert HTML to pdf in CodeIgniter using Mpdf. Below are the steps to generate PDF in the CodeIgniter…
6 CommentsIn this CodeIgniter 4 tutorial, you will learn, exporting data to excel using the PhpSpreadsheet library. Similar PostsCodeIgniter 4 – Export data to excel in…
4 CommentsIn this post, we gonna look at using Laravel’s Eloquent ORM and Query Builder methods to query data from the database where the field is…
Leave a CommentDefining MySQL database connection in the Slim 4 framework is pretty simple. In this slim framework 4 tutorial, we gonna create a project with Slim-Skeleton.…
13 CommentsWe gonna fix the XAMPP access denied error in windows by running the application as an administrator. You can just right-click xampp-control.exe and you can…
1 CommentExport Database To export a database, open up the terminal, making sure that you are not logged into MySQL, and execute the below command with…
Leave a CommentThe operator nullsafe allows a developer to eliminate the null check for each property before going on to the next chain of the property or…
Leave a CommentIn this post, we gonna create custom functions and load it in the Laravel project. These functions can be accessible all over the project. Loading…
Leave a CommentThe built-in array_filter() the function removes all the empty elements, zeros, false and null values from an array. This function uses a callback function to…
Leave a CommentThe null coalescing assignment operator is a shorthand for null coalescing operations. Let’s take a example code $data[‘date’] = $data[‘date’] ?? new DateTime(); So, instead…
Leave a Comment