All Tutorials & Sample Codes

Browse all our Laravel 12, CodeIgniter 4, and PHP tutorials. Each guide includes working source code, best practices, and step-by-step instructions.

Showing 43–48 of 79 posts · Page 8 of 14

Generate PDF from HTML in Laravel 11 Using TCPDF – Complete Tutorial

Generating PDF files is essential for invoices, reports, receipts, and certificates in Laravel applications. While popular options like <b>barryvdh/laravel-dompdf</b> or <b>spatie/laravel-pdf</b> (using Chromium for modern CSS) dominate in 2025–2026, TCPDF remains a solid, pure-PHP choice with no external dependencies. It excels at precise control over layout and supports HTML + basic CSS.<br> In this tutorial, we'll build a complete invoice PDF generator in <b>Laravel 11</b> using the <span class="highlight">elibyy/tcpdf-laravel</span> package. By the end, you'll generate downloadable PDFs from Blade views.

By Revathi M · Read

Generate PDF in CodeIgniter 4 Using TCPDF – Complete Tutorial

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;PDF generation is essential for invoices, receipts, reports, and printable documents in web apps. CodeIgniter 4 doesn't include a native PDF library, so <b>TCPDF</b> (a robust, open-source PHP class) is a popular choice. This tutorial shows you how to integrate TCPDF in CodeIgniter 4 to generate dynamic PDFs from database data. We'll build a simple invoice system.

By Revathi M · Read

Laravel 11 Stripe Payment Gateway Integration: Step-by-Step Tutorial

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Stripe remains one of the most popular payment gateways for Laravel applications thanks to its robust API, strong security (PCI compliance), and support for global payments. In this updated <b>Laravel 11 Stripe integration tutorial</b> (compatible with 2026 best practices), we'll implement a secure one-time payment system using Stripe.js for client-side tokenization and the Stripe PHP library for server-side processing.

By Revathi M · Read

CodeIgniter 4 Stripe Payment Gateway Integration – Payment Intents

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Integrating a reliable and secure payment gateway is essential for any modern e-commerce application, membership site, or online service. In 2026, <strong>Stripe</strong> remains the #1 choice for developers worldwide due to its excellent documentation, global payment support, built-in fraud protection, and seamless compliance with PSD2, SCA, and 3D Secure standards.

By Revathi M · Read

How to Add Social Media Share Buttons in Laravel 11 – Step-by-Step Tutorial

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;In today's digital landscape, driving organic traffic and increasing user engagement is essential for any Laravel-powered blog, e-commerce site, portfolio, or content platform. One of the simplest yet most effective ways to achieve this is by integrating <strong>social media share buttons</strong> directly into your pages. When visitors can easily share your articles, products, or posts on platforms like Facebook, X (Twitter), LinkedIn, WhatsApp, Telegram, Reddit, and more, your content reaches wider audiences without paid promotion.

By Revathi M · Read

Create a Dynamic XML Sitemap in CodeIgniter 4 – Complete Tutorial

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;A dynamic <b>XML sitemap</b> in <b>CodeIgniter 4</b> automatically lists your website's URLs (including posts, pages, or products) and helps search engines like Google discover and index content faster. This improves <b>SEO</b>, crawl efficiency, and visibility — especially for sites with frequently updated or database-driven content. <br /><br /> In this guide, you'll build a fully dynamic sitemap that pulls URLs from a database, includes metadata like <span class="highlight">lastmod</span>, <span class="highlight">changefreq</span>, and <span class="highlight">priority</span>, and serves it at /sitemap.xml.

By Revathi M · Read