<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Msh Sayket</title>
    <description>The latest articles on DEV Community by Msh Sayket (@msh_sayket_6a8d9f36faac8a).</description>
    <link>https://dev.to/msh_sayket_6a8d9f36faac8a</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2194770%2Fdfe588e6-98d5-4be8-a377-6f1e2988366a.jpg</url>
      <title>DEV Community: Msh Sayket</title>
      <link>https://dev.to/msh_sayket_6a8d9f36faac8a</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/msh_sayket_6a8d9f36faac8a"/>
    <language>en</language>
    <item>
      <title>Laravel File Upload with Progress Bar Example</title>
      <dc:creator>Msh Sayket</dc:creator>
      <pubDate>Tue, 27 May 2025 13:37:44 +0000</pubDate>
      <link>https://dev.to/msh_sayket_6a8d9f36faac8a/laravel-file-upload-with-progress-bar-example-45kj</link>
      <guid>https://dev.to/msh_sayket_6a8d9f36faac8a/laravel-file-upload-with-progress-bar-example-45kj</guid>
      <description>&lt;p&gt;In this post, we will learn how to ajax image upload with progress bar in laravel application. Laravel File Upload with Progress Bar&lt;/p&gt;

&lt;p&gt;You always did file uploading in a normal way, and you can do it easily. But when you have a large amount of file size, it takes time to upload on a server. Maybe you can’t reduce the time to upload a file or image, but you can display a progress bar with a percentage so the client can understand how much time is left to upload a file.&lt;/p&gt;

&lt;p&gt;In this tutorial, we will create two routes with the FileController controller file. When you click on the submit button, fire the jQuery AJAX method, and the upload of the image will show you a progress bar. Let’s follow the steps below to do this example.&lt;/p&gt;

&lt;p&gt;Laravel File Upload with Progress Bar Example&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 1: Install Laravel 11
&lt;/h2&gt;

&lt;p&gt;First of all, we need to get a fresh Laravel 11 version application using the command below because we are starting from scratch. So, open your terminal or command prompt and run the command below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;composer create-project laravel/laravel example-app
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 2: Create Routes
&lt;/h2&gt;

&lt;p&gt;In the first step, we will add two new routes. One for displaying the view, and we will write jQuery code in the view file. In the second step, we will create a POST route for file upload.&lt;/p&gt;

&lt;p&gt;routes/web.php&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;?php

use Illuminate\Support\Facades\Route;

use App\Http\Controllers\FileController;

Route::controller(FileController::class)-&amp;gt;group(function(){
    Route::get('file-upload', 'index');
    Route::post('file-upload', 'store')-&amp;gt;name('file.upload');
});
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://www.devscriptschool.com/laravel-file-upload-with-progress-bar-example/" rel="noopener noreferrer"&gt;Read Full Tutorials&lt;/a&gt;&lt;br&gt;
Read Also: &lt;a href="https://laravelblog50.wordpress.com/2025/05/27/how-to-install-bootstrap-5-in-laravel-12-with-vite/" rel="noopener noreferrer"&gt;How to Install Bootstrap 5 in Laravel 12 with Vite&lt;/a&gt;&lt;/p&gt;

</description>
      <category>laravel</category>
      <category>php</category>
      <category>beginners</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Laravel 12 CKeditor Image Upload Example</title>
      <dc:creator>Msh Sayket</dc:creator>
      <pubDate>Mon, 26 May 2025 11:50:40 +0000</pubDate>
      <link>https://dev.to/msh_sayket_6a8d9f36faac8a/laravel-12-ckeditor-image-upload-example-2lnj</link>
      <guid>https://dev.to/msh_sayket_6a8d9f36faac8a/laravel-12-ckeditor-image-upload-example-2lnj</guid>
      <description>&lt;p&gt;In this post, I will show you how to image upload with CKEditor in laravel 12 application.&lt;/p&gt;

&lt;p&gt;CKEditor is a web-based, open-source WYSIWYG (What You See Is What You Get) editor that allows users to edit text content in a browser. It is a powerful tool that enables users to create and format text, add images and multimedia, and edit HTML code without any knowledge of coding. CKEditor was first released in 2003 and has since become a popular choice for web developers and content creators due to its versatility and ease of use. It is written in JavaScript and can be integrated into any web application with ease.&lt;/p&gt;

&lt;p&gt;we will create a simple CKEditor instance with an image upload option that saves the image to local storage. We will set up two routes, one for GET and one for POST requests (for image uploads). Once the user selects an image and submits it, the image will be stored in the ‘media’ folder.&lt;/p&gt;

&lt;p&gt;So, let’s see below the steps to getting done with image upload in CKEditor Laravel.&lt;/p&gt;

&lt;h2&gt;
  
  
  Laravel 12 CKeditor Image Upload Example
&lt;/h2&gt;

&lt;h2&gt;
  
  
  Step 1: Install Laravel 12
&lt;/h2&gt;

&lt;p&gt;First of all, we need to get a fresh Laravel 12 version application using the command below because we are starting from scratch. So, open your terminal or command prompt and run the command below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;composer create-project laravel/laravel example-app
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 2: Create Route
&lt;/h2&gt;

&lt;p&gt;In this step, we will add three routes with GET and POST method in routes/web.php file. so let’s add it.&lt;/p&gt;

&lt;p&gt;routes/web.php&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;?php

use Illuminate\Support\Facades\Route;

use App\Http\Controllers\CkeditorController;

Route::get('ckeditor', [CkeditorController::class, 'index']);
Route::post('ckeditor/upload', [CkeditorController::class, 'upload'])-&amp;gt;name('ckeditor.upload');
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Read More From &lt;a href="https://www.devscriptschool.com/laravel-12-ckeditor-image-upload-example/" rel="noopener noreferrer"&gt;DevScriptSchool &lt;/a&gt;&lt;/p&gt;

</description>
      <category>laravel</category>
      <category>php</category>
      <category>programming</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Laravel 12 Generate PDF and Send Email Tutorial</title>
      <dc:creator>Msh Sayket</dc:creator>
      <pubDate>Thu, 22 May 2025 14:56:52 +0000</pubDate>
      <link>https://dev.to/msh_sayket_6a8d9f36faac8a/laravel-12-generate-pdf-and-send-email-tutorial-6fo</link>
      <guid>https://dev.to/msh_sayket_6a8d9f36faac8a/laravel-12-generate-pdf-and-send-email-tutorial-6fo</guid>
      <description>&lt;p&gt;In this tutorial, I will show you how to generate pdf file and send email attachments in laravel 12 application.&lt;/p&gt;

&lt;p&gt;In this example, I will simply use dompdf to generate a PDF file and send an email with a PDF attachment. We will use Gmail SMTP for the mail driver. You just need to follow a few steps to create a simple example of sending an email with the created PDF file in a Laravel app.&lt;/p&gt;

&lt;p&gt;Laravel 12 Generate PDF and Send Email Tutorial Example&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 1: Install Laravel 12
&lt;/h2&gt;

&lt;p&gt;This step is not required; however, if you have not created the Laravel app, then you may go ahead and execute the below command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;composer create-project laravel/laravel example-app
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 2: Install dompdf Package
&lt;/h2&gt;

&lt;p&gt;First of all, we will install the barryvdh/laravel-dompdf composer package by following the composer command in your Laravel application.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;composer require barryvdh/laravel-dompdf
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Read Also: &lt;a href="https://www.devscriptschool.com/laravel-12-custom-user-login-and-registration-tutorial/" rel="noopener noreferrer"&gt;Laravel 12 Custom User Login and Registration Tutorial&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 3: Make Configuration
&lt;/h2&gt;

&lt;p&gt;In the first step, you have to add send mail configuration with mail driver, mail host, mail port, mail username, and mail password so Laravel will use those sender details on the email. So you can simply add the following:&lt;br&gt;
.env&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;MAIL_DRIVER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
MAIL_USERNAME=mygoogle@gmail.com
MAIL_PASSWORD=rrnnucvnqlbsl
MAIL_ENCRYPTION=tls
MAIL_FROM_ADDRESS=mygoogle@gmail.com
MAIL_FROM_NAME="${APP_NAME}"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Step 4: Create Mail Class&lt;br&gt;
We are going from scratch, and in the first step, we will create an email for testing using the Laravel Mail facade. So let’s simply run the command below.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;php artisan make:mail MailExample
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now you will have a new folder “Mail” in the app directory with the MailExample.php file. So let’s simply copy the below code and paste it into that file. &lt;a href="https://www.devscriptschool.com/laravel-12-generate-pdf-and-send-email-tutorial/" rel="noopener noreferrer"&gt;Read Full Tutorials&lt;/a&gt;&lt;/p&gt;

</description>
      <category>laravel</category>
      <category>php</category>
      <category>webdev</category>
      <category>programming</category>
    </item>
    <item>
      <title>Laravel 12 Custom User Login and Registration Tutorial</title>
      <dc:creator>Msh Sayket</dc:creator>
      <pubDate>Thu, 22 May 2025 14:54:13 +0000</pubDate>
      <link>https://dev.to/msh_sayket_6a8d9f36faac8a/laravel-12-custom-user-login-and-registration-tutorial-2je</link>
      <guid>https://dev.to/msh_sayket_6a8d9f36faac8a/laravel-12-custom-user-login-and-registration-tutorial-2je</guid>
      <description>&lt;p&gt;Laravel provides Jetstream, Breeze, Fortify, and UI packages for auth scaffolding. But sometimes we need to create our own login, registration, dashboard, and logout. So we can write our own logic and design. We will use the Laravel Auth facade to create custom user auth scaffolding step by step.&lt;/p&gt;

&lt;p&gt;this tutorial, I would like to share with you how to create a custom user login and registration page in the laravel 12 application.&lt;/p&gt;

&lt;p&gt;Laravel 12 Custom User Login and Registration Example&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 1: Install Laravel 12
&lt;/h2&gt;

&lt;p&gt;This step is not required; however, if you have not created the Laravel app, then you may go ahead and execute the below command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;composer create-project laravel/laravel example-app
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 2: Create Routes
&lt;/h2&gt;

&lt;p&gt;In this step, we need to create a custom routes for login, register, home, and logout. So open your routes/web.php file and add the following routes.&lt;/p&gt;

&lt;p&gt;routes/web.php&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;?php

use Illuminate\Support\Facades\Route;

use App\Http\Controllers\Auth\AuthController;

Route::get('/', function () {
    return view('welcome');
});

Route::get('login', [AuthController::class, 'index'])-&amp;gt;name('login');
Route::post('post-login', [AuthController::class, 'postLogin'])-&amp;gt;name('login.post'); 
Route::get('registration', [AuthController::class, 'registration'])-&amp;gt;name('register');
Route::post('post-registration', [AuthController::class, 'postRegistration'])-&amp;gt;name('register.post'); 
Route::get('dashboard', [AuthController::class, 'dashboard']); 
Route::get('logout', [AuthController::class, 'logout'])-&amp;gt;name('logout');
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Read Also: &lt;a href="https://www.devscriptschool.com/laravel-12-image-intervention-tutorial-with-example/" rel="noopener noreferrer"&gt;Laravel 12 Image Intervention Tutorial With Example&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 3: Create Controller
&lt;/h2&gt;

&lt;p&gt;In this step, we will create a new AuthController controller with index(), registration(), postLogin(), postRegistration(), dashboard(), create(), and logout() methods.&lt;/p&gt;

&lt;p&gt;app/Http/Controllers/Auth/AuthController.php&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;?php

namespace App\Http\Controllers\Auth;

use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Session;
use App\Models\User;
use Hash;
use Illuminate\View\View;
use Illuminate\Http\RedirectResponse;

class AuthController extends Controller
{
    /**
     * Write code on Method
     *
     * @return response()
     */
    public function index(): View
    {
        return view('auth.login');
    }  

    /**
     * Write code on Method
     *
     * @return response()
     */
    public function registration(): View
    {
        return view('auth.registration');
    }

    /**
     * Write code on Method
     *
     * @return response()
     */
    public function postLogin(Request $request): RedirectResponse
    {
        $request-&amp;gt;validate([
            'email' =&amp;gt; 'required',
            'password' =&amp;gt; 'required',
        ]);

        $credentials = $request-&amp;gt;only('email', 'password');
        if (Auth::attempt($credentials)) {
            return redirect()-&amp;gt;intended('dashboard')
                        -&amp;gt;withSuccess('You have Successfully loggedin');
        }

        return redirect("login")-&amp;gt;withError('Oppes! You have entered invalid credentials');
    }

    /**
     * Write code on Method
     *
     * @return response()
     */
    public function postRegistration(Request $request): RedirectResponse
    {  
        $request-&amp;gt;validate([
            'name' =&amp;gt; 'required',
            'email' =&amp;gt; 'required|email|unique:users',
            'password' =&amp;gt; 'required|min:6',
        ]);

        $data = $request-&amp;gt;all();
        $user = $this-&amp;gt;create($data);

        Auth::login($user); 

        return redirect("dashboard")-&amp;gt;withSuccess('Great! You have Successfully loggedin');
    }

    /**
     * Write code on Method
     *
     * @return response()
     */
    public function dashboard()
    {
        if(Auth::check()){
            return view('dashboard');
        }

        return redirect("login")-&amp;gt;withSuccess('Opps! You do not have access');
    }

    /**
     * Write code on Method
     *
     * @return response()
     */
    public function create(array $data)
    {
      return User::create([
        'name' =&amp;gt; $data['name'],
        'email' =&amp;gt; $data['email'],
        'password' =&amp;gt; Hash::make($data['password'])
      ]);
    }

    /**
     * Write code on Method
     *
     * @return response()
     */
    public function logout(): RedirectResponse
    {
        Session::flush();
        Auth::logout();

        return Redirect('login');
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://www.devscriptschool.com/laravel-12-custom-user-login-and-registration-tutorial/" rel="noopener noreferrer"&gt;Read Full Tutorials&lt;/a&gt;&lt;/p&gt;

</description>
      <category>laravel</category>
      <category>php</category>
      <category>webdev</category>
      <category>programming</category>
    </item>
    <item>
      <title>How to Create Custom Validation Rules in Laravel 12</title>
      <dc:creator>Msh Sayket</dc:creator>
      <pubDate>Sun, 11 May 2025 06:06:04 +0000</pubDate>
      <link>https://dev.to/msh_sayket_6a8d9f36faac8a/how-to-create-custom-validation-rules-in-laravel-12-mh3</link>
      <guid>https://dev.to/msh_sayket_6a8d9f36faac8a/how-to-create-custom-validation-rules-in-laravel-12-mh3</guid>
      <description>&lt;p&gt;In this post, we will learn how to create custom validation rules in the laravel 12 application.&lt;/p&gt;

&lt;p&gt;Laravel provides default validation rules such as email, required, unique, date, and more. If you need to create a custom validation rule in Laravel, I can guide you through the steps&lt;/p&gt;

&lt;p&gt;In this example, we will create a custom validation rule called BirthYearRule. We will add an input text box for birth_year and validate that the user enters a year between 1980 and the current year using our custom validation.  You Can Learn &lt;a href="https://www.devscriptschool.com/laravel-12-image-intervention-tutorial-with-example/" rel="noopener noreferrer"&gt;Laravel 12 Image Intervention Tutorial With Example&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 1: Install Laravel 12
&lt;/h2&gt;

&lt;p&gt;First of all, we need to get a fresh Laravel 12 version application using the command below because we are starting from scratch. So, open your terminal or command prompt and run the command below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;composer create-project laravel/laravel example-app
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Step 2: Create Routes&lt;/p&gt;

&lt;p&gt;In this step, we will create two routes: GET and POST for a custom validation rule example. So let's add it.&lt;/p&gt;

&lt;p&gt;routes/web.php&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;?php

use Illuminate\Support\Facades\Route;

use App\Http\Controllers\CustomValidationController;

Route::get('custom-validation', [CustomValidationController::class, 'create']);
Route::post('custom-validation', [CustomValidationController::class, 'store'])-&amp;gt;name('custom.validation.post');


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://www.devscriptschool.com/how-to-create-custom-validation-rules-in-laravel-12/" rel="noopener noreferrer"&gt;Read More&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>laravel</category>
      <category>php</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Laravel Collection Count and CountBy Method Example</title>
      <dc:creator>Msh Sayket</dc:creator>
      <pubDate>Sat, 22 Mar 2025 09:50:25 +0000</pubDate>
      <link>https://dev.to/msh_sayket_6a8d9f36faac8a/laravel-collection-count-and-countby-method-example-4lho</link>
      <guid>https://dev.to/msh_sayket_6a8d9f36faac8a/laravel-collection-count-and-countby-method-example-4lho</guid>
      <description>&lt;p&gt;In this tutorial. I am going to explain you example of laravel collection count example. you will learn laravel collection countby example. This tutorial will give you simple example of count collection laravel. you can see laravel collection count by key.&lt;/p&gt;

&lt;p&gt;I will give you list of examples of count and countby colletion in laravel. so you can easily use it with your laravel 5, laravel 6, laravel 7, laravel 8, laravel 9, laravel 10 and laravel 11, laravel 12 application. so let’s see bellow example that will helps you lot. You Can Learn &lt;a href="https://www.devscriptschool.com/how-to-send-email-using-a-gmail-account-in-laravel-12/" rel="noopener noreferrer"&gt;How to send email using a Gmail account in laravel 12&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Laravel Collection Count and CountBy Method Example
&lt;/h2&gt;

&lt;p&gt;Count Syntax:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$collecton-&amp;gt;count();
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Laravel Collection count() Example&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;public function index()
{    
$collection = collect([1, 2, 3, 4, 5, 6]);      
$count = $collection-&amp;gt;count();           
dd($count);
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output:&lt;/p&gt;

&lt;p&gt;6&lt;br&gt;
CountBy Syntax:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$collecton-&amp;gt;countBy(    
$callback
);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Laravel Collection countBy() Example&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;public function index(){    
$collection = collect(["one", "two", "two", "three", "three", "four"]);      
$count = $collection-&amp;gt;countBy();           
dd($count);
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Illuminate\Support\Collection Object(
    [items:protected] =&amp;gt; Array        
 (            
 [one] =&amp;gt; 1            
 [two] =&amp;gt; 2            
 [three] =&amp;gt; 2            
 [four] =&amp;gt; 1        
 )
)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Laravel Collection countBy() with function Example&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;public function index(){    
$collection = collect([            
["id"=&amp;gt;1, "name"=&amp;gt;"Hardik", "role"=&amp;gt;"Admin"],            
["id"=&amp;gt;2, "name"=&amp;gt;"Paresh", "role"=&amp;gt;"Admin"],            
["id"=&amp;gt;3, "name"=&amp;gt;"Rakesh", "role"=&amp;gt;"User"],        
]);      
$count = $collection-&amp;gt;countBy(function ($item) {                   
 return $item['role'];                
});            
dd($count);
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Illuminate\Support\Collection Object
(    
[items:protected] =&amp;gt; Array        
 (           
 [Admin] =&amp;gt; 2            
 [User] =&amp;gt; 1        
 )
)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I hope it can help you… Read More Tutorials from &lt;a href="https://www.devscriptschool.com/" rel="noopener noreferrer"&gt;DevScriptSchool &lt;/a&gt;&lt;/p&gt;

</description>
      <category>laravel</category>
      <category>php</category>
      <category>programming</category>
      <category>beginners</category>
    </item>
    <item>
      <title>How to Create Custom Helper Functions in Laravel 12</title>
      <dc:creator>Msh Sayket</dc:creator>
      <pubDate>Sat, 22 Mar 2025 09:47:12 +0000</pubDate>
      <link>https://dev.to/msh_sayket_6a8d9f36faac8a/how-to-create-custom-helper-functions-in-laravel-12-23m</link>
      <guid>https://dev.to/msh_sayket_6a8d9f36faac8a/how-to-create-custom-helper-functions-in-laravel-12-23m</guid>
      <description>&lt;p&gt;In this example, i will show How to Create Custom Helper Functions in Laravel 12 application.&lt;/p&gt;

&lt;p&gt;We know Laravel 12 also provides helper functions for arrays, URLs, routes, paths, etc. But sometimes, we may require more custom helper functions for our project. So, we need to create our own custom helper file and define global functions that can be easily used.&lt;/p&gt;

&lt;p&gt;How to Create Custom Helper Functions in Laravel 12&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 1: Install Laravel 12
&lt;/h2&gt;

&lt;p&gt;This step is not required; however, if you have not created the Laravel app, then you may go ahead and execute the below command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;laravel new example-app
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 2: Create helpers.php File
&lt;/h2&gt;

&lt;p&gt;In this step, you need to create &lt;code&gt;app/Helpers/helpers.php&lt;/code&gt; in your Laravel project and place the following code in that file:&lt;/p&gt;

&lt;p&gt;app/Helpers/helpers.php&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;?php

use Carbon\Carbon;

/**
 * Write code on Method
 *
 * @return response()
 */
if (! function_exists('convertYmdToMdy')) {
    function convertYmdToMdy($date)
    {
        return Carbon::createFromFormat('Y-m-d', $date)-&amp;gt;format('m-d-Y');
    }
}

/**
 * Write code on Method
 *
 * @return response()
 */
if (! function_exists('convertMdyToYmd')) {
    function convertMdyToYmd($date)
    {
        return Carbon::createFromFormat('m-d-Y', $date)-&amp;gt;format('Y-m-d');
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Read Also: &lt;a href="https://www.devscriptschool.com/how-to-generate-pdf-file-in-laravel-12-using-dompdf-example/" rel="noopener noreferrer"&gt;How to generate pdf file in laravel 12 using dompdf Example&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Step 3: Register File Path In composer.json File&lt;br&gt;
In this step, you have to put the path of the helpers file. So, basically, open the &lt;code&gt;composer.json&lt;/code&gt; file and put the following code in that file:&lt;/p&gt;

&lt;p&gt;composer.json&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;...

    "autoload": {
        "psr-4": {
            "App\\": "app/",
            "Database\\Factories\\": "database/factories/",
            "Database\\Seeders\\": "database/seeders/"
        },
        "files": [
            "app/Helpers/helpers.php"
        ]
    },

...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After registering, we need to run the composer autoload command so that it loads our helper file. Next, run the command below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;composer dump-autoload
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 4: Add Route
&lt;/h2&gt;

&lt;p&gt;Next, you have to open and update the following routes in the &lt;code&gt;routes/web.php&lt;/code&gt; file.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.devscriptschool.com/how-to-create-custom-helper-functions-in-laravel-12/" rel="noopener noreferrer"&gt;Read More&lt;/a&gt;&lt;/p&gt;

</description>
      <category>laravel</category>
      <category>php</category>
      <category>beginners</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>How To Install Bootstrap Auth Scaffolding in a Laravel 12</title>
      <dc:creator>Msh Sayket</dc:creator>
      <pubDate>Thu, 13 Mar 2025 08:35:57 +0000</pubDate>
      <link>https://dev.to/msh_sayket_6a8d9f36faac8a/how-to-install-bootstrap-auth-scaffolding-in-a-laravel-12-49b1</link>
      <guid>https://dev.to/msh_sayket_6a8d9f36faac8a/how-to-install-bootstrap-auth-scaffolding-in-a-laravel-12-49b1</guid>
      <description>&lt;p&gt;In this Tutorial, I will show how to install Bootstrap auth scaffolding in a Laravel 12 application.&lt;/p&gt;

&lt;p&gt;Laravel provides a UI package for the easy setup of auth scaffolding. Laravel UI offers simple authentication features, including login, registration, password reset, email verification, and password confirmation, using Bootstrap, React, and Vue. You Can Learn &lt;a href="https://www.devscriptschool.com/how-to-send-email-using-a-gmail-account-in-laravel-12/" rel="noopener noreferrer"&gt;How to send email using a Gmail account in laravel 12&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In this tutorial, I will provide you with simple steps on how to install Bootstrap 5 and how to create auth scaffolding using Bootstrap 5 in Laravel 12.&lt;/p&gt;

&lt;h2&gt;
  
  
  How To Install Bootstrap Auth Scaffolding in a Laravel 12 Example
&lt;/h2&gt;

&lt;p&gt;So, let’s follow the steps below:&lt;/p&gt;

&lt;h2&gt;
  
  
  Install Laravel 12
&lt;/h2&gt;

&lt;p&gt;This step is not required; however, if you have not created the Laravel app, then you may go ahead and execute the below command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;laravel new example-app
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Install Laravel UI
&lt;/h2&gt;

&lt;p&gt;Let’s run the below command to install the Laravel UI package:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;composer require laravel/ui
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Next, you have to install the Laravel UI package command for creating auth scaffolding using Bootstrap 5. So let’s run the below command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;php artisan ui bootstrap
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;OR&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;php artisan ui bootstrap --auth
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, let’s run the below command to install npm:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install
npm run dev
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It will generate CSS and JS min files. You Can Read More From &lt;a href="https://www.devscriptschool.com/how-to-install-bootstrap-auth-scaffolding-in-a-laravel-12/" rel="noopener noreferrer"&gt;DevScriptSchool &lt;/a&gt;&lt;/p&gt;

</description>
      <category>laravel</category>
      <category>php</category>
      <category>bootstrap</category>
      <category>learning</category>
    </item>
    <item>
      <title>How to send email using a Gmail account in laravel 12</title>
      <dc:creator>Msh Sayket</dc:creator>
      <pubDate>Thu, 13 Mar 2025 08:33:25 +0000</pubDate>
      <link>https://dev.to/msh_sayket_6a8d9f36faac8a/how-to-send-email-using-a-gmail-account-in-laravel-12-18jd</link>
      <guid>https://dev.to/msh_sayket_6a8d9f36faac8a/how-to-send-email-using-a-gmail-account-in-laravel-12-18jd</guid>
      <description>&lt;p&gt;In this post, I will show you step by step how to send email using a Gmail account in laravel 12 application.&lt;/p&gt;

&lt;p&gt;Laravel 12 provides an inbuilt mail configuration for sending emails. You can use several drivers for sending emails in laravel 12. You can use SMTP, Mailgun, Postmark, Amazon SES, and send email. Here in this example, we will use Google Gmail mailer driver for sending email.&lt;/p&gt;

&lt;p&gt;How to send email using a Gmail account in laravel 12&lt;/p&gt;

&lt;h2&gt;
  
  
  Install Laravel 12
&lt;/h2&gt;

&lt;p&gt;This step is not required; however, if you have not created the Laravel app, then you may go ahead and execute the below command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;laravel new example-app
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 2: Make Configuration
&lt;/h2&gt;

&lt;p&gt;In the second step, you have to add the mail configuration. Set the mail driver as “gmail”, the mail host, mail port, mail username, and mail password. Laravel 12 will use these sender details for emails. You can simply add them as follows:&lt;/p&gt;

&lt;p&gt;.env&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;MAIL_MAILER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=465
MAIL_USERNAME=mygoogle@gmail.com
MAIL_PASSWORD=rrnnucvnqlbsl
MAIL_ENCRYPTION=tls
MAIL_FROM_ADDRESS=mygoogle@gmail.com
MAIL_FROM_NAME="${APP_NAME}"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Make sure you have to enable Google security setting from your Gmail. Go to Google account and click on “Account”. Once you are on the “Account” page, click on “Security”. Scroll down to the bottom and you will find “Less secure app access” settings. Set it as ON. Read More from &lt;a href="https://www.devscriptschool.com/how-to-send-email-using-a-gmail-account-in-laravel-12/" rel="noopener noreferrer"&gt;DevScriptSchool &lt;/a&gt;&lt;/p&gt;

</description>
      <category>laravel</category>
      <category>php</category>
      <category>tutorial</category>
      <category>learning</category>
    </item>
    <item>
      <title>How To Import And Export Excel And Csv Files In Laravel 12</title>
      <dc:creator>Msh Sayket</dc:creator>
      <pubDate>Thu, 13 Mar 2025 08:30:52 +0000</pubDate>
      <link>https://dev.to/msh_sayket_6a8d9f36faac8a/how-to-import-and-export-excel-and-csv-files-in-laravel-12-1g2n</link>
      <guid>https://dev.to/msh_sayket_6a8d9f36faac8a/how-to-import-and-export-excel-and-csv-files-in-laravel-12-1g2n</guid>
      <description>&lt;p&gt;In this example, I will show you how to import and export excel and csv files in laravel 12 application.&lt;/p&gt;

&lt;p&gt;We will use the &lt;code&gt;maatwebsite/excel&lt;/code&gt; composer package for import and export tasks. In this example, we will create a simple form for input where you can upload a CSV file and create multiple users. Then, I will create an export route that will download all users from the database in an Excel file.&lt;/p&gt;

&lt;p&gt;So, let’s follow the steps below to create the import and export function in a Laravel 12 application. You can export files with .csv, .xls, and .xlsx extensions. You Can Learn &lt;a href="https://www.devscriptschool.com/how-to-add-form-validation-in-laravel-12-example/" rel="noopener noreferrer"&gt;How to add form validation in laravel 12 Example&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;How To Import And Export Excel And Csv Files In Laravel 12 Example&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 1: Install Laravel 12
&lt;/h2&gt;

&lt;p&gt;This step is not required; however, if you have not created the Laravel app, then you may go ahead and execute the below command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;laravel new example-app
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 2: Install maatwebsite/excel Package
&lt;/h2&gt;

&lt;p&gt;In this step, we need to install the &lt;code&gt;maatwebsite/excel&lt;/code&gt; package via the Composer package manager. Open your terminal and enter the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;composer require maatwebsite/excel
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 3: Create Dummy Records
&lt;/h2&gt;

&lt;p&gt;In this step, we will create some dummy records for the users table so we can export them later. Let’s run the following Tinker command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;php artisan tinker
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;User::factory()-&amp;gt;count(10)-&amp;gt;create()
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 4: Create Import Class
&lt;/h2&gt;

&lt;p&gt;In Maatwebsite version 3, a way is provided to build import classes, which need to be used in the controller. It would be a great idea to create a new Import class. So, you have to run the following command and make the necessary changes to the code in that file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;php artisan make:import UsersImport --model=User
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://www.devscriptschool.com/how-to-import-and-export-excel-and-csv-files-in-laravel-12/" rel="noopener noreferrer"&gt;Read Full Tutorials&lt;/a&gt;&lt;/p&gt;

</description>
      <category>excel</category>
      <category>laravel</category>
      <category>webdev</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>How to add form validation in laravel 12 Example</title>
      <dc:creator>Msh Sayket</dc:creator>
      <pubDate>Thu, 13 Mar 2025 08:27:38 +0000</pubDate>
      <link>https://dev.to/msh_sayket_6a8d9f36faac8a/how-to-add-form-validation-in-laravel-12-example-3dgm</link>
      <guid>https://dev.to/msh_sayket_6a8d9f36faac8a/how-to-add-form-validation-in-laravel-12-example-3dgm</guid>
      <description>&lt;p&gt;In this example, I will show you how to add form validation in laravel 12 application.&lt;/p&gt;

&lt;p&gt;Laravel 12 provides a request object to add form validation using it. We will use request-&amp;gt;validate() for adding validation rules and custom messages. We will use the $errors variable to display error messages. I will show you a very simple step-by-step example of how to add form validation in the Laravel 12 application. You Can Learn &lt;a href="https://www.devscriptschool.com/how-to-generate-pdf-file-in-laravel-12-using-dompdf-example/" rel="noopener noreferrer"&gt;How to generate pdf file in laravel 12 using dompdf Example&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So, let’s see the example below for adding form validation.&lt;/p&gt;

&lt;p&gt;How to add form validation in laravel 12 Example&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 1: Install Laravel 12
&lt;/h2&gt;

&lt;p&gt;This step is not required; however, if you have not created the Laravel app, then you may go ahead and execute the below command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;laravel new example-app
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 2: Create Controller
&lt;/h2&gt;

&lt;p&gt;In this step, we will create a new &lt;code&gt;FormController&lt;/code&gt; for adding form validation. In this controller, we will add two methods called &lt;code&gt;create()&lt;/code&gt; and &lt;code&gt;store()&lt;/code&gt;. So let’s create a new controller using the following command.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;php artisan make:controller FormController
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Next, let’s update the following code in that file. &lt;a href="https://www.devscriptschool.com/how-to-add-form-validation-in-laravel-12-example/" rel="noopener noreferrer"&gt;Read More&lt;/a&gt;&lt;/p&gt;

</description>
      <category>laravel</category>
      <category>php</category>
      <category>webdev</category>
      <category>beginners</category>
    </item>
    <item>
      <title>How to generate pdf file in laravel 12 using dompdf Example</title>
      <dc:creator>Msh Sayket</dc:creator>
      <pubDate>Tue, 11 Mar 2025 05:23:44 +0000</pubDate>
      <link>https://dev.to/msh_sayket_6a8d9f36faac8a/how-to-generate-pdf-file-in-laravel-12-using-dompdf-example-1ce3</link>
      <guid>https://dev.to/msh_sayket_6a8d9f36faac8a/how-to-generate-pdf-file-in-laravel-12-using-dompdf-example-1ce3</guid>
      <description>&lt;p&gt;In this post, I will show you how to generate pdf file in laravel 12 using dompdf composer package.&lt;/p&gt;

&lt;p&gt;We will use the DomPDF Composer package to generate a PDF file in Laravel 12. We will create 10 dummy users and some dummy text to add to the PDF file. So, let’s follow the steps below to create the PDF file:&lt;/p&gt;

&lt;p&gt;How to generate pdf file in laravel 12 using dompdf Example&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 1: Install Laravel 12
&lt;/h2&gt;

&lt;p&gt;This step is not required; however, if you have not created the Laravel app, then you may go ahead and execute the below command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;laravel new example-app
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 2: Install DomPDF Package
&lt;/h2&gt;

&lt;p&gt;Next, we will install the DomPDF package using the following Composer command. Let’s run the command below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;composer require barryvdh/laravel-dompdf
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 3: Create Controller
&lt;/h2&gt;

&lt;p&gt;In this step, we will create a PDFController with a method called generatePDF() where we will write the code to generate a PDF. So, let’s create the controller using the command below. You Can Learn &lt;a href="https://www.devscriptschool.com/laravel-12-image-upload-example-tutorial/" rel="noopener noreferrer"&gt;Laravel 12 Image Upload Example Tutorial&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;php artisan make:controller PDFController
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the &lt;code&gt;PDFController&lt;/code&gt;, we also get users table data and display it into a PDF file. So, you can add some dummy data to the users table by using the following Tinker command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;php artisan tinker

User::factory()-&amp;gt;count(10)-&amp;gt;create()
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, update the code in the controller file.&lt;/p&gt;

&lt;p&gt;app/Http/Controllers/PDFController.php&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use App\Models\User;
use PDF;

class PDFController extends Controller
{
    /**
     * Display a listing of the resource.
     *
     * @return \Illuminate\Http\Response
     */
    public function generatePDF()
    {
        $users = User::get();

        $data = [
            'title' =&amp;gt; 'Welcome to ItSolutionStuff.com',
            'date' =&amp;gt; date('m/d/Y'),
            'users' =&amp;gt; $users
        ]; 

        $pdf = PDF::loadView('myPDF', $data);

        return $pdf-&amp;gt;download('itsolutionstuff.pdf');
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://www.devscriptschool.com/how-to-generate-pdf-file-in-laravel-12-using-dompdf-example/" rel="noopener noreferrer"&gt;Read More&lt;/a&gt;&lt;/p&gt;

</description>
      <category>laravel</category>
      <category>dompdf</category>
      <category>php</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
