Removing duplicates from the flatten array is simple and we have a built-in function for it. The array_unique function removes duplicates from the one-dimensional array. we gonna use array_unique function along with array_map, serialize and unserialize to remove duplicates from the multidimensional PHP array. array_map — Applies the callback to the elements of the given array serialized — Generates a storable representation of a value unserialize — Creates a PHP value from a stored representation
Leave a CommentYear: 2021
By calling the get_avatar() method we can get the author’s avatar, below is the code snippet to display the author’s avatar on posts or pages…
Leave a CommentLaravel 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 CommentIf you try to copy a file or directory or something from your running container to your Windows 10 host machine you may get the…
2 CommentsIn 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 tutorial, we gonna upload files and folders to the AWS s3 bucket using PowerShell. First, you’ll need to install the general AWS.Tools.Installer package, for…
Leave a CommentEncryption is the act of distorting simple information to protect it from the prying eyes of third parties. In the digital world, we call the…
Leave a CommentDeveloping applications for mobile phones is a complex process. This new platform is expected to reflect a unified brand image and align with responsive and…
1 CommentIn this post, we gonna enable enable VNC in the Amazon Mac EC2 instance. Open your terminal and SSH into the amazon Mac Instance. If…
Leave a CommentIn 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 Comment