<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
redsquirrelstudio / laravel-backpack-export-operation example snippets
'providers' => ServiceProvider::defaultProviders()->merge([
/*
* Package Service Providers...
*/
//Some other package's service providers...
RedSquirrelStudio\LaravelBackpackExportOperation\Providers\ExportOperationProvider::class,
])->toArray(),
class ExampleCrudController extends CrudController
{
use \Backpack\CRUD\app\Http\Controllers\Operations\ListOperation;
use \Backpack\CRUD\app\Http\Controllers\Operations\CreateOperation;
use \Backpack\CRUD\app\Http\Controllers\Operations\UpdateOperation;
use \Backpack\CRUD\app\Http\Controllers\Operations\DeleteOperation;
use \Backpack\CRUD\app\Http\Controllers\Operations\ShowOperation;
use \RedSquirrelStudio\LaravelBackpackExportOperation\ExportOperation;
//...
//Probably some more CRUD config...
protected function setupExportOperation()
{
CRUD::addColumn([
'name' => 'id',
'label' => 'ID',
'type' => 'number',
]);
CRUD::addColumn([
'name' => 'name',
'label' => 'Name',
'type' => 'text',
]);
}
//Fetch functions or something...
//...
protected function setupExportOperation()
{
$this->disableUserConfiguration();
//...
//...
protected function setupExportOperation()
{
$this->queueExport();
//...
//...
protected function setupExportOperation()
{
$this->setQueueMessage("Your Message about the export being queued.");
//...
//...
//Filesystem disk to store export files
'disk' => "s3",
//Path to store export files
'path' => "/2024/application-name/exports",
//...
//...
//Queue to dispatch export jobs to
'queue' => 'export-queue',
//...