Fix zip file extraction

This commit is contained in:
Amanmyrat 2023-08-04 14:18:16 +05:00
parent 67b594899a
commit 11988d61ca
2 changed files with 4 additions and 4 deletions

View File

@ -51,7 +51,7 @@ class Report extends Controller
$report_detail->report_id = $id;
$report_detail->shop_id = $shop->id;
// on local explode storage\app on live server storage/app
$report_detail->file = explode('storage/app', $storageDestinationPath)[1].'/'.$item;
$report_detail->file = '/extract'.explode('extract', $storageDestinationPath)[1].'/'.$item;
$report_detail->save();
Log::info("saved succesfully");
}else {

View File

@ -36,10 +36,10 @@ class ReportDetail extends Model
];
public function getShopFieldAttribute() {
return $this->shop->name;
return $this->shop != null ? $this->shop->name : '';
}
public function getReportFieldAttribute() {
return $this->report->name;
return $this->report != null ? $this->report->name : '';
}
}