Commit 36374ddb authored by Nicolas Widart's avatar Nicolas Widart

Adding a file service

parent 67460c2b
<?php namespace Modules\Media\Services;
use Modules\Media\Helpers\FileHelper;
use Modules\Media\Repositories\FileRepository;
class FileService
......@@ -19,7 +18,7 @@ class FileService
{
// Save the file info to db
$savedFile = $this->file->createFromFile($file);
dd($savedFile);
// Move the uploaded file to /public/assets/media/
$file->move(public_path() . '/assets/media', $savedFile->path);
......
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