diff --git a/app/Http/Controllers/CommissionPresetController.php b/app/Http/Controllers/CommissionPresetController.php index c00af7e3..4603679b 100644 --- a/app/Http/Controllers/CommissionPresetController.php +++ b/app/Http/Controllers/CommissionPresetController.php @@ -55,8 +55,10 @@ public function store(Request $request) 'price' => $res['price'] ]); # Optional File Upload - $res = $request->image->store('commission-presets', 'do_public'); - $commissionPreset->forceFill(['image_path' => $res])->save(); + if($request->image) { + $res = $request->image->store('commission-presets', 'do_public'); + $commissionPreset->forceFill(['image_path' => $res])->save(); + } return redirect()->to(route('creator.show', [auth()->user(), 'commissions'])) ->with(['success' => 'Your Commission Preset has been created!']);