Skip to content

Commit

Permalink
Merge pull request #74 from MohamedKhedr700/enhance/merge-data-with-r…
Browse files Browse the repository at this point in the history
…equest

Enhance get data with request and upload method
  • Loading branch information
hassanzohdy committed May 25, 2022
2 parents 559d0a6 + ad278c3 commit a6f2485
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Repository/Concerns/Fillers.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ protected function getRequestWithData($data): Request
{
// keep original request untouched, just clone it
if (is_array($data)) {
$request = clone request();
$request = new Request();
$request->merge($data);
// Merge files
foreach ($data as $key => $file) {
Expand Down Expand Up @@ -242,7 +242,7 @@ protected function upload($model, $columns = null)
$clearable = $options['clearable'] ?? false;
$arrayable = $options['arrayable'] ?? null;

$file = $this->request->file($input);
$file = $this->request->{$input};

if (is_null($arrayable)) {
$arrayable = is_array($file);
Expand Down

0 comments on commit a6f2485

Please sign in to comment.