Posts

Showing posts from November, 2022

AJAX SEARCH IMAGE FIELD ONPAGE USING NAME FIELD

  AJAX SEARCH IMAGE FIELD ONPAGE USING NAME FIELD <!doctype html> <html lang="en">     <head>     <script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.9.2/dist/umd/popper.min.js" integrity="sha384-IQsoLXl5PILFhosVNubq5LC7Qb9DXgDA9i+tQ8Zj3iwWAwPtgFTxbJ8NT4GN1R8p" crossorigin="anonymous"></script> <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.min.js" integrity="sha384-cVKIPhGWiC2Al4u+LWgxfKTRIcfu0JTxR+EQDz/bgldoEyl4H0zUF0QKbrJ0EcQF" crossorigin="anonymous"></script> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.1/css/all.min.css" integrity="sha512-MV7K8+y+gLIBoVD59lQIYicR65iaqukzvf/nwasF0nqhPay5w/9lJmVM2hMDcnK1OnMGCdVK+iQrJ7lzPJQd1w==" crossorigin="anonymous" referrerpolicy="no-referrer" /> <link href="https://cdn.jsdelivr.net/npm/bootstrap@

EXPORT DATA TO EXCEL WITH LARAVEL

 EXPORT INTO EXCEL SHEET LARAVEL DATA AND TABLES Export Data to Excel with PHP MAKE A CONTROLLER FOR ROUTE >> PHP ARTISAN MAKE:CONTROLLER bookingController <?php namespace App\Http\Controllers ; use Illuminate\Http\ Request ; use App\Models\ booking ; class bookingController extends Controller {     public function booking ()     {         $bk = booking :: all ();         // dd($bk);         return view ( 'booking' ,[ 'data' => $bk ]);     } } MAKE A FUNCTION IN CONTROLLER OR MAKE A HELPERS.PHP FILE INSIDE APP FOLDER.  INSIDE helpers.php ,   <?php function func (){             $fileName = "members-data_" . date ( 'Y-m-d' ) . ".xls" ;           $fields  =   array ( 'ID' ,   'Car Name ' ,   'Driver Name' ,   'Customer Name' ,   'Mobile' ,   'Pickup Location' ,   'Drop Location' ,   ' Pickup Date' ,   'Pickup Time ' ,   'Adults' ,   '

DEPENDABLE DROPDOWN AJAX WITH AND WITHOUT AJAX [ XMLHttpRequest ]

 LARAVEL AJAX DEPENDABLE DROPDOWN [ COUNTRY - STATE - CITY ] CONTROLLER  PHP ARTISAN MAKE:CONTROLLER USERCONTROLLER USERCONTROLLER.PHP  <?php namespace App\Http\Controllers ; use Illuminate\Http\ Request ; use Validator ; use Response ; use Redirect ; use App\Models\{ Country , State , City }; class UserController extends Controller {     //     public function index ()     {         $data [ 'countries' ] = Country :: get ([ "name" , "id" ]);         return view ( 'index' , $data );     }     public function fetchState ( Request $request )     {         $data [ 'states' ] = State :: where ( "country_id" , $request -> country_id )-> get ([ "name" , "id" ]);         return response ()-> json ( $data );     }     public function fetchCity ( Request $request )     {         $data [ 'cities' ] = City :: where ( "state_id" , $request -> state_id )-> get ([ "na