Commit cb989fdc authored by mengyixi's avatar mengyixi

FileService

parent e3665832
...@@ -14,5 +14,5 @@ interface FileServiceContract ...@@ -14,5 +14,5 @@ interface FileServiceContract
public function getAll(); public function getAll();
public function get($id); public function get($id);
public function delete(); public function delete($file_id);
} }
\ No newline at end of file
...@@ -19,4 +19,10 @@ class FileController extends Controller ...@@ -19,4 +19,10 @@ class FileController extends Controller
{ {
$this->mFile->getAll(); $this->mFile->getAll();
} }
public function delete(Request $request)
{
$file_id = $request;
$this->mFile->delete($file_id);
}
} }
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
*/ */
namespace App\Services; namespace App\Services;
use App\Models\File;
use App\Contracts\FileServiceContract; use App\Contracts\FileServiceContract;
...@@ -24,8 +25,9 @@ class FileService implements FileServiceContract ...@@ -24,8 +25,9 @@ class FileService implements FileServiceContract
// TODO: Implement get() method. // TODO: Implement get() method.
} }
public function delete() public function delete($file_id)
{ {
// TODO: Implement delete() method. // TODO: Implement delete() method.
// $file =
} }
} }
\ No newline at end of file
This diff is collapsed.
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