laravel

Working with multiple image select in Laravel Livewire

Working with multiple image select in Laravel Livewire

In this article, I am going to show you a simple idea to fix the loss of previously selected image/images whenever you want to select more images using livewire with laravel. I know there are several ways to achieve this but I find this method very easy with the help of some livewire lifecycle hooks which are the Updating and the Updated hooks. This screenshot shows the full code needed by your livewire component class Let's start by looking at what Updating and Updated hooks do. Then, I will explain the codes in the above screenshot step by step. Updating:…
Read More
WP Bones 1.7.0: Enhancing WordPress Development with Improved Logging and Database Handling

WP Bones 1.7.0: Enhancing WordPress Development with Improved Logging and Database Handling

The latest release of WP Bones, version 1.7.0, introduces a suite of enhancements that streamline the development process for WordPress plugins by improving logging capabilities and database interactions. This update is particularly exciting for developers who appreciate the Laravel framework's approach but are working within the WordPress ecosystem. Enhanced Logging Configuration One of the standout features of this release is the addition of a new logging entry in the config/plugin.php file. This new feature allows developers to configure logging behavior directly within their plugin settings, making it easier to manage how information is logged and where it is stored. This…
Read More
[Laravel v11 x Docker] Efficiently Set Up a Laravel App Dev Environment with Laravel Sail

[Laravel v11 x Docker] Efficiently Set Up a Laravel App Dev Environment with Laravel Sail

About Laravel Sail Laravel Sail is the official development environment for the Laravel framework. Sail provides a lightweight command-line interface (CLI) to easily set up and manage a Laravel application development environment using Docker. Below, we explain the main features and usage of Laravel Sail. Benefits of Using Laravel Sail Build a development environment independent of the OS Sail uses Docker to containerize the development environment for Laravel applications. This allows you to build a development environment that is independent of the OS. Easy setup of the development environment With Sail, you can set up a Laravel development environment with…
Read More
How to enable/disable PHP native functions – php.ini Tutorial

How to enable/disable PHP native functions – php.ini Tutorial

In this article I want to give you the step by step procedure to enable or disable php native functions editing the “disable_functions” directive in the php.ini file. Sometimes the default PHP configuration on your server needs to be customized to accommodate the compatibility of your system with the production environment. Why this tutorial I'm the author of Inspector.dev the real-time monitoring package for Laravel and Symfony. This package uses pro_open and proc_close php native functions to perform data transfer from your server to the Inspector API asynchronously. It can also be configured to use the native CURL functions of…
Read More
How to Implement QR Code Generation in Laravel

How to Implement QR Code Generation in Laravel

QR codes are a practical tool for sharing data, and implementing them in a Laravel application can be straightforward and scalable. This blog post will guide you through building a QR code generation system using contracts, traits, and action classes. Before we dive into the code, let's install the necessary packages and dependencies. Step 1: Install SimpleSoftwareIO QR Code Package To generate QR codes in Laravel, we will use the SimpleSoftwareIO QR Code package. It provides an easy-to-use API for creating QR codes in various formats, such as PNG, SVG, and more. Run the following command to install the package:…
Read More
Comparing Laravel and Symfony: Choosing the Right PHP Framework for Your Project

Comparing Laravel and Symfony: Choosing the Right PHP Framework for Your Project

In PHP development, selecting the right framework is crucial for building efficient, scalable, and maintainable applications. Laravel and Symfony are two of the most popular PHP frameworks, each with its unique strengths and limitations. This article provides an in-depth comparison of both, helping you make an informed choice. Overview of Laravel Laravel, created by Taylor Otwell in 2011, aims to simplify and enhance the web development experience. It is renowned for its elegant syntax, comprehensive documentation, and vibrant ecosystem. The Laravel ecosystem includes numerous powerful tools like Laravel Forge, Laravel Nova, and Laravel Vapor, further empowering developers. Core Features of…
Read More
Step-by-Step: Deploy Laravel App to Cloud (AWS, Google, Azure, DigitalOcean) with CI/CD Using GitHub Actions/GitLab CI

Step-by-Step: Deploy Laravel App to Cloud (AWS, Google, Azure, DigitalOcean) with CI/CD Using GitHub Actions/GitLab CI

Deploying a Laravel app to a cloud server with CI/CD using GitHub Actions or GitLab CI involves several steps. Below is a hands-on example and step-by-step guide for deploying a Laravel app to a cloud server like AWS, Google Cloud, Azure, or DigitalOcean using CI/CD pipelines. Prerequisites: A Laravel project hosted on GitHub or GitLab. A cloud server (AWS EC2, Google Cloud Compute Engine, Azure VM, or DigitalOcean Droplet). SSH access to your cloud server. Installed Docker on the cloud server (optional but recommended for consistency across environments). High-level steps: Set up the cloud server (AWS, Google Cloud, Azure, or…
Read More
How to Build a Real-time Chat App with Laravel, Vue.js, and Pusher

How to Build a Real-time Chat App with Laravel, Vue.js, and Pusher

Real-time chat applications like WhatsApp and Discord have witnessed a remarkable surge in popularity in recent years, revolutionising communication with instantaneous messaging. However, while building your own chat app with this functionality might seem daunting, it’s entirely achievable. In this tutorial, you will learn how to build a real-time chat application using Laravel, Vue.js, and Pusher. You'll use the Laravel framework to build the back end of the chat application, a combination of Blade templates and Vue.js to develop the user interface and layout of the application, and the Pusher platform for the real-time chat functionality. Prerequisites To complete this…
Read More
Optimizing Laravel Queries: The Right Way to Chunk Data

Optimizing Laravel Queries: The Right Way to Chunk Data

Why Should You Avoid Using chunk? It's better to use chunkById instead of chunk to avoid missing rows during batch updates. Using chunk can shift the offset of subsequent queries after updating rows, causing unprocessed rows to be skipped. For example: Post::where('processed', 0)->chunk(100, function($posts) { foreach($posts as $post) { $post->processed = 1; $post->save(); } }); Enter fullscreen mode Exit fullscreen mode The above code generates the following queries. select * from `posts` where `processed` = 0 limit 100 offset 0 select * from `posts` where `processed` = 0 limit 100 offset 100 ... Enter fullscreen mode Exit fullscreen mode The…
Read More
Mastering Laravel Password Reset Customization: A Comprehensive Guide

Mastering Laravel Password Reset Customization: A Comprehensive Guide

Introduction Password reset functionality is a critical component of any modern web application. While Laravel provides a robust out-of-the-box solution, there are times when you need to tailor this process to meet specific requirements or enhance user experience. In this tutorial, we'll dive deep into customizing Laravel's password reset workflow, covering everything from basic modifications to advanced techniques. A Brief History of Laravel Authentication Before we delve into customization, let's take a quick trip down memory lane to understand how Laravel's authentication solutions have evolved: Laravel UI: The first iteration of a complete auth solution in Laravel, which served the…
Read More
No widgets found. Go to Widget page and add the widget in Offcanvas Sidebar Widget Area.