Commit 3c96e939 authored by Nicolas Widart's avatar Nicolas Widart

Returning the created model

parent 63934248
......@@ -26,14 +26,12 @@ class EloquentFileRepository extends EloquentBaseRepository implements FileRepos
{
$fileName = FileHelper::slug($file->getClientOriginalName());
$this->model->create([
return $this->model->create([
'filename' => $fileName,
'path' => public_path() . "/assets/media/{$fileName}",
'extension' => $file->guessClientExtension(),
'mimetype' => $file->getClientMimeType(),
'filesize' => $file->getFileInfo()->getSize(),
]);
return $this->model;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment