Laravel Excel
Installation
# Requirements
- PHP:
^7.2\|^8.0 - Laravel:
^5.8 - PhpSpreadsheet:
^1.15 - PHP extension
php_zipenabled - PHP extension
php_xmlenabled - PHP extension
php_gd2enabled - PHP extension
php_iconvenabled - PHP extension
php_simplexmlenabled - PHP extension
php_xmlreaderenabled - PHP extension
php_zlibenabled
# Installation
Require this package in the composer.json of your Laravel project. This will download the package and PhpSpreadsheet.
composer require maatwebsite/excel
The Maatwebsite\Excel\ExcelServiceProvider is auto-discovered and registered by default.
If you want to register it yourself, add the ServiceProvider in config/app.php:
'providers' => [
/*
* Package Service Providers...
*/
Maatwebsite\Excel\ExcelServiceProvider::class,
]
The Excel facade is also auto-discovered.
If you want to add it manually, add the Facade in config/app.php:
'aliases' => [
...
'Excel' => Maatwebsite\Excel\Facades\Excel::class,
]
To publish the config, run the vendor publish command:
php artisan vendor:publish --provider="Maatwebsite\Excel\ExcelServiceProvider" --tag=config
This will create a new config file named config/excel.php.
Source Link : https://docs.laravel-excel.com/3.1/getting-started/installation.html

No comments