Fix zip file extraction
This commit is contained in:
parent
67b594899a
commit
11988d61ca
|
|
@ -50,8 +50,8 @@ class Report extends Controller
|
||||||
$report_detail = new ReportDetail();
|
$report_detail = new ReportDetail();
|
||||||
$report_detail->report_id = $id;
|
$report_detail->report_id = $id;
|
||||||
$report_detail->shop_id = $shop->id;
|
$report_detail->shop_id = $shop->id;
|
||||||
// on local explode storage\app on live server storage/app
|
// 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();
|
$report_detail->save();
|
||||||
Log::info("saved succesfully");
|
Log::info("saved succesfully");
|
||||||
}else {
|
}else {
|
||||||
|
|
|
||||||
|
|
@ -36,10 +36,10 @@ class ReportDetail extends Model
|
||||||
];
|
];
|
||||||
|
|
||||||
public function getShopFieldAttribute() {
|
public function getShopFieldAttribute() {
|
||||||
return $this->shop->name;
|
return $this->shop != null ? $this->shop->name : '';
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getReportFieldAttribute() {
|
public function getReportFieldAttribute() {
|
||||||
return $this->report->name;
|
return $this->report != null ? $this->report->name : '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue