Export pdf using php with image support

composer require dompdf/dompdf <?php require 'vendor/autoload.php'; use Dompdf\Dompdf; // Initialize dompdf $dompdf = new Dompdf(); // Load HTML content $html = '<h1>Export HTML to PDF</h1><p>This PDF is generated using Dompdf.</p>';…

0 Comments

Push Notification in php and laravel

A. Without ajax load with page loading <a class="bell_notification_clicker" href="#"> <img src="{{ asset('/assets/') }}/img/icon/bell.svg" alt=""> <?php $purchase_plan_count = DB::table('purchase_plan')->where('notification', 0)->count(); if($purchase_plan_count > 3){ $purchase_plan_count = 3; } ?> <span>{{$purchase_plan_count}}</span> </a>…

0 Comments

Drag and drop and clone

A. Drag, drop and clone <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Drag, Drop & Clone</title> <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script> <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.min.js"></script> <style> .draggable { width: 100px; padding:…

0 Comments

Get input type file value using jquery

  $(document).ready(function(){ $('#fileInput').change(function(){ var fileName = $(this).val().split('\\').pop(); // Get only the file name alert("Selected file: " + fileName); }); }); $(document).ready(function(){ $('#fileInput').change(function(){ var file = $(this).prop('files')[0]; // Get the first…

0 Comments