Generate Laravel Multipage PDF with Image, Padding, Table Data

In this Laravel tutorial, we will discuss how to easily create a Multipage PDF document by using the DomPDF package. The PDF file will contain Images, Background Images, and Table data with padding around the content.

We will walk through a detailed step-by-step tutorial on how we can generate the PDF file from HTML content which can have content of multiple or separate pages.

Read more

Create a PDF File with Images from HTML using mPDF in Laravel

We usually need the feature in our app, which is the ability to convert HTML content into PDF format for sharing, printing, or archiving purposes.

Laravel, a popular PHP framework, can be easily integrated with the mPDF library to generate PDF files with ease.

This tutorial will guide you through the process of creating a PDF file from HTML with images content using mPDF in Laravel, and also with other data content with custom CSS styles.

We will also discuss how to create multiple page sin PDF generated file to result in multipage PDF.

Let’s get started!

Read more

How to Generate PDF File using DomPDF – Tutorial by Example

In this tutorial, we will explore how to generate PDF files in Laravel by using the DomPDF package. Generating PDF files is a common requirement when developing ERP systems, e-commerce websites, or applications that require reports or invoices in PDF format.

We will walk through a simple example of creating and downloading a PDF file in Laravel 8.

Read more

Download or Preview PDF of HTML in Laravel 9 with DOMPDF

In this guide, you will learn how to generate PDF files dynamically from HTML view in the Laravel application by leveraging the DomPDF package module.

We will walk through easy steps to easily configure the PDF file layout or control over if a PDF file needs to be downloaded or just previewed in a new tab of the browser.

PDF files are a portable solution to keep the importation handy or easily share to anybody by any means.

The best part is that we are converting already designed HTML into PDF file, so we don’t need to worry about layout we will be getting the generated PDF files.

Read more

Laravel – How to Integrate MailChimp API Step by Step Tutorial

Integrating Mailchimp API into your Laravel application can greatly enhance the functionality of your website by managing subscribers, sending emails via campaigns, and tracking email results.

This tutorial will guide you through the process of setting up Mailchimp API in a Laravel 5 application using the skovmand/mailchimp-laravel package. By the end of this tutorial, you will be able to create a simple email subscription system, send campaigns, and track email results using Mailchimp.

Read more

Laravel – How to use Eager Loading approach

Laravel application performance is very crucial and plays an important role, one way to optimize it is through the Eager Loading approach.

Laravel Eloquent Relationships such as has one, has many, and many to many provide an efficient way to manage related data without writing complex SQL queries.

This tutorial will discuss the importance of Eager Loading and show examples of its various techniques.

Read more

Laravel Eloquent whereHas() Conditional Usage Guide

In this tutorial, we will delve into Laravel’s whereHas() condition within Eloquent relationships. Working with relationships is a common task in Laravel applications, and sometimes, you might want to apply conditions to these relationships. In such cases, the whereHas() method comes in handy.

This article is a step-by-step guide for implementing the whereHas() method in Laravel.

Read more

Laravel 10 Cron Job Task Scheduling Tutorial

In this tutorial, we will walk through the process of setting up a cron job in Laravel 10 using the built-in task scheduler. We will explain the steps to create a custom command and register it in the task scheduler. Also, test the scheduler command.

By following this guide, you will learn how to effectively create, manage, and execute cron jobs in Laravel 10.

Cron jobs are essential for many web applications, as they automate tasks such as sending email notifications or updating records at specific intervals.

Read more

Laravel 8 – How to Setup Cron Job Task Scheduling Tutorial

Cron jobs play a crucial role in automating repetitive tasks in web applications. Laravel offers an elegant way to schedule and manage cron jobs with its built-in task scheduler. In this tutorial, we’ll go through the process of setting up a cron job in Laravel, step by step. We will create a simple example to demonstrate task scheduling and execution using Laravel 8.

Cron jobs can be beneficial for various reasons, such as sending automated email notifications or updating properties and products periodically. By using Laravel’s task scheduler, you can define the frequency of the tasks, ensuring they run at the desired intervals.

Read more

How to Create Laravel Custom Forgot & Reset Password Example

In this Laravel tutorial, we will discuss how to customize Laravel’s built-in authentication system, which simplifies the process of implementing user authentication. We will create a custom Forgot password and rest feature in the Laravel app.

We will demonstrate how to create a custom forgot and reset password example using Laravel. The process of creating a custom forgot and reset password system in Laravel involves setting up a new Laravel project, configuring the database, running the authentication scaffolding, customizing routes, modifying email templates, creating custom notifications, customizing reset password logic, and testing the functionality.

Let’s get started and achieve this by following an easy step-by-step process.

Read more

How to Make External API calls in Laravel? – GET, POST, PUT, DELETE

In the modern web development era, integrating external APIs in a Laravel application has become a vital aspect. In this tutorial, you will learn how to call an external API in a Laravel controller. We will be covering various examples of sending HTTP API requests, such as GET, POST, PUT, and DELETE, using Laravel’s Http facade. This tutorial will be helpful for Laravel 6, 7, 8, 9, and 10 versions.

To call an external API in a Laravel controller, we will utilize the Http facade provided by Laravel. This facade allows us to send API requests with GET, POST, PUT, DELETE, and headers.

Read more

Laravel Concatenation: Combining Two Columns with Examples

In this article, we will explore different ways to concatenate two columns in Laravel applications, specifically in versions 6, 7, 8, 9, and 10.

Concatenating columns is useful when you want to display the combined result of two or more columns in a single query.

We will cover two methods to achieve this: using Laravel Query Builder with DB raw and using Laravel Eloquent Model Scope. Both methods have their advantages and limitations, so choose the one that suits your needs best.

Before we dive into the examples, let’s ensure that you have the necessary prerequisites in place. You should have a working Laravel application with a User model and a database connection.

Make sure you have the required columns in the database schema for this example, such as ‘first_name’ and ‘last_name’. Now, let’s get started with the two methods.

Read more

How to Use Laravel WhereIn Query with Examples

Laravel is a powerful PHP framework that helps developers build elegant applications while adhering to the best coding practices.

One of Laravel’s strengths is its Eloquent ORM (Object-Relational Mapping), which allows developers to interact with databases using a simple and efficient syntax.

In this article, we will explore how to use the WhereIn query in Laravel Eloquent, which allows you to match a specified column against an array of values.

This feature comes in handy when you want to fetch records that match specific conditions. We will also provide examples using Laravel versions 6 through 10.

Read more

How to Delete Files from Public Folder and Storage Folder in Laravel?

In this article, we will focus on the process of deleting files from the public and storage folders in Laravel. Understanding this is essential for developers working with Laravel applications. We will delve into two methods to remove files from folders: using File Facade and Storage Facade. By the end of this article, you will have a clear understanding of how to check if a file exists and how to delete it if needed.

Laravel provides a clean and elegant syntax that allows developers to remove files from public and storage folders easily. In some cases, you might need to delete files from these folders, such as when you want to remove outdated or unnecessary files from your application.

In this tutorial, we will provide examples that demonstrate how to delete files using File Facade and Storage Facade in Laravel applications.

Read more