Export CSV File
step-1 composer requires maatwebsite/excel Step-2 make Database Connection step-3 make model can make any model which data required in excel file.in my case model is Product.php step-3 config/app.php 'providers'=> [ Maatwebite\Excel\ ExcelServiceProvider :: class ] 'aliases'=> [ 'Excel' =>Maatwebite\Excel\Facades\ Excel :: class ] step-4 make controller can make any model which data required in excel file.in my case model is ProductController.php namespace App\Http\Controllers ; use App\Models\ Product ; use Excel ; use Illuminate\Http\ Request ; use Illuminate\Support\Facades\ Validator ; use Maatwebsite\Excel\Concerns\ FromCollection ; class ProductController extends Controller { public function exportData () { return Excel :: downloa...