-
-
Notifications
You must be signed in to change notification settings - Fork 111
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Export selected result records (#370)
- Loading branch information
1 parent
cf1d73d
commit 84759a2
Showing
2 changed files
with
50 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<?php | ||
|
||
namespace App\Exports; | ||
|
||
use Maatwebsite\Excel\Concerns\FromArray; | ||
use Maatwebsite\Excel\Concerns\WithHeadings; | ||
|
||
class ResultsSelectedBulkExport implements FromArray, WithHeadings | ||
{ | ||
protected $results; | ||
|
||
public function __construct(array $results) | ||
{ | ||
$this->results = $results; | ||
} | ||
|
||
public function array(): array | ||
{ | ||
return $this->results; | ||
} | ||
|
||
public function headings(): array | ||
{ | ||
return [ | ||
'id', | ||
'ping', | ||
'download', | ||
'upload', | ||
'server id', | ||
'server url', | ||
'server name', | ||
'result url', | ||
'scheduled', | ||
'successful', | ||
'data', | ||
'created at', | ||
]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters