Posts

Showing posts with the label Excel

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' ,   ...