create a exporter in laravel command 1

create a exporter in laravel command

php artisan make:export UsersExport --model=User

Here is what the above code is Doing:
1. We’re importing the Maatwebsite\Excel\Concerns\FromCollection trait.
2. We’re using the trait in our UsersExport class.
3. We’re defining the collection method, which returns the collection of users we want to export.

Similar Posts