Skip to content

Commit

Permalink
Fix column
Browse files Browse the repository at this point in the history
  • Loading branch information
nickdekruijk committed Aug 5, 2022
1 parent 037f637 commit f178bd2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Controllers/ModelController.php
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ public function download($slug, $id, $column, $data)
abort_if(empty($row[$column]), 404);
$file = (object)$row[$column][$data];
abort_if(empty($file) || !isset($file->name) || !isset($file->type) || !isset($file->size) || !isset($file->store), 404);
$file_path = rtrim($this->columns('data')['storage_path'] ?? storage_path(), '/') . '/' . $file->store;
$file_path = rtrim($this->columns($column)['storage_path'] ?? storage_path(), '/') . '/' . $file->store;
abort_if(!file_exists($file_path), 404);
return response()->download($file_path, $file->name);
}
Expand Down

0 comments on commit f178bd2

Please sign in to comment.