Skip to content

Commit

Permalink
Use default filesystem
Browse files Browse the repository at this point in the history
  • Loading branch information
eighty9nine committed Oct 20, 2023
1 parent 0ea21d3 commit 110b906
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/DefaultImport.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ public function __construct(

public function collection(Collection $collection)
{
dd($collection);
foreach ($collection as $row) {
$this->model::create($row->toArray());
}
Expand Down
2 changes: 1 addition & 1 deletion src/ExcelImportAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ protected function getDefaultForm(): array
FileUpload::make('upload')
->label(fn ($livewire) => str($livewire->getTable()->getPluralModelLabel())->title() . ' ' . __('Excel Data'))
->default(1)
->disk($this->getDisk())
->columns()
->required(),
];
Expand Down Expand Up @@ -84,7 +85,6 @@ private function importData(): Closure
{
return function (array $data, $livewire): bool {
$importObject = new $this->importClass($livewire->getModel(), ...$this->importClassAttributes);
// dd($importObject, $data);
Excel::import($importObject, $data['upload']);

return true;
Expand Down

0 comments on commit 110b906

Please sign in to comment.