Fix zip file extraction
This commit is contained in:
parent
67b594899a
commit
11988d61ca
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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 : '';
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue