Browse Source

update condition

pull/1/head
wahyun 9 months ago
parent
commit
ecc91e30a0
  1. 3
      app/Http/Controllers/ActivityDokumenController.php

3
app/Http/Controllers/ActivityDokumenController.php

@ -51,8 +51,9 @@ class ActivityDokumenController extends Controller
$destinationPath = $this->setCustomeDirectoryUpload($company['company_name']);
$result = $document->move($destinationPath['pathActivityDocument'], $name);
}
if(!$result || !$company)
if(!$result || !$company) {
return response()->json(['status'=>'failed','message'=>'Upload failed!','code'=> 500], 500);
}
$data = [
'activity_id' => (int)$activity_id,
'file' => $name,

Loading…
Cancel
Save