-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Write test for lazy collections without queue
- Loading branch information
1 parent
af25dd3
commit 6fbf739
Showing
6 changed files
with
68 additions
and
6 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
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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
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,35 @@ | ||
<?php | ||
|
||
namespace Maatwebsite\Excel\Tests\Data\Stubs; | ||
|
||
use Illuminate\Contracts\Queue\ShouldQueue; | ||
use Illuminate\Support\LazyCollection; | ||
use Maatwebsite\Excel\Concerns\Exportable; | ||
use Maatwebsite\Excel\Concerns\FromCollection; | ||
|
||
class EloquentLazyCollectionQueuedExport implements FromCollection, ShouldQueue | ||
{ | ||
use Exportable; | ||
|
||
public function collection(): LazyCollection | ||
{ | ||
return collect([ | ||
[ | ||
'firstname' => 'Patrick', | ||
'lastname' => 'Brouwers', | ||
], | ||
[ | ||
'firstname' => 'Patrick', | ||
'lastname' => 'Brouwers', | ||
], | ||
[ | ||
'firstname' => 'Patrick', | ||
'lastname' => 'Brouwers', | ||
], | ||
[ | ||
'firstname' => 'Patrick', | ||
'lastname' => 'Brouwers', | ||
], | ||
])->lazy(); | ||
} | ||
} |