aungmyat / report
This will create excel file in background with laravel queue and send it via email
dev-main
2021-09-09 06:13 UTC
Requires
- maatwebsite/excel: ^3.1
This package is auto-updated.
Last update: 2024-04-09 11:48:43 UTC
README
#This is report system
#There are 4 simple steps to complete this package after installing.
-
add following Serviceprovider in config/app.php.
\Aungmyat\Report\ReportServiceProvider::class,
-
Set up Mail in .env
-
If You are not set up Queue.
- Set up driver for QueueConnection in .env {Change => database}
- Run (php artisan queue:table)
- Run (php artisan migrate)
4 . Usage
* use Aungmyat\Report\Process_provider\reportingProcess;
public function method()
{
$query = 'Your raw query as text';
$filename = 'filename.xlsx';
$columns = ['name','email'];
$senderemail = 'blabla@gmail.com';
$limit = 0; //Optional
//# This parameter($limit) will decide to download your report from browser if your
report data is less than your limit.if not so, it will send from email.
$subject = 'Your email subject';
return reportingProcess::process($query,$filename,$columns,$senderemail,$limit, $subject);
}