From 8bbbb06c5e6605a21566529958e5b2ecebd1a2dc Mon Sep 17 00:00:00 2001 From: Petri Asikainen Date: Wed, 23 Jun 2021 11:22:41 +0300 Subject: [PATCH] testing image upload via api --- app/Http/Controllers/Api/AccessoriesController.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/app/Http/Controllers/Api/AccessoriesController.php b/app/Http/Controllers/Api/AccessoriesController.php index e7a5743568..ed0f449920 100644 --- a/app/Http/Controllers/Api/AccessoriesController.php +++ b/app/Http/Controllers/Api/AccessoriesController.php @@ -13,6 +13,7 @@ use Auth; use Carbon\Carbon; use DB; use Illuminate\Http\Request; +use App\Http\Requests\ImageUploadRequest; class AccessoriesController extends Controller { @@ -85,10 +86,10 @@ class AccessoriesController extends Controller * * @author [A. Gianotto] [] * @since [v4.0] - * @param \Illuminate\Http\Request $request + * @param App\Http\Requests\ImageUploadRequest $request * @return \Illuminate\Http\Response */ - public function store(Request $request) + public function store(ImageUploadRequest $request) { $this->authorize('create', Accessory::class); $accessory = new Accessory; @@ -178,11 +179,11 @@ class AccessoriesController extends Controller * * @author [A. Gianotto] [] * @since [v4.0] - * @param \Illuminate\Http\Request $request + * @param App\Http\Requests\ImageUploadRequest $request * @param int $id * @return \Illuminate\Http\Response */ - public function update(Request $request, $id) + public function update(ImageUploadRequest $request, $id) { $this->authorize('update', Accessory::class); $accessory = Accessory::findOrFail($id);