Server push fixed report saving on server
This commit is contained in:
parent
f2b99b29a6
commit
67b594899a
|
|
@ -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;
|
||||||
$report_detail->file = explode('storage\app', $storageDestinationPath)[1].'/'.$item;
|
// on local explode storage\app on live server storage/app
|
||||||
Log::info(explode('storage\app', $storageDestinationPath)[1].'/'.$item);
|
$report_detail->file = explode('storage/app', $storageDestinationPath)[1].'/'.$item;
|
||||||
$report_detail->save();
|
$report_detail->save();
|
||||||
Log::info("saved succesfully");
|
Log::info("saved succesfully");
|
||||||
}else {
|
}else {
|
||||||
|
|
|
||||||
|
|
@ -10,11 +10,11 @@ fields:
|
||||||
type: text
|
type: text
|
||||||
file:
|
file:
|
||||||
label: File
|
label: File
|
||||||
span: auto
|
|
||||||
mode: file
|
mode: file
|
||||||
|
fileTypes: 'zip,rar'
|
||||||
useCaption: true
|
useCaption: true
|
||||||
thumbOptions:
|
thumbOptions:
|
||||||
mode: crop
|
mode: crop
|
||||||
extension: auto
|
extension: auto
|
||||||
fileTypes: 'zip,rar'
|
span: auto
|
||||||
type: fileupload
|
type: fileupload
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
<?php namespace Tps\Shops\Updates;
|
||||||
|
|
||||||
|
use Schema;
|
||||||
|
use October\Rain\Database\Updates\Migration;
|
||||||
|
|
||||||
|
class BuilderTableUpdateTpsShopsReports extends Migration
|
||||||
|
{
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::table('tps_shops_reports', function($table)
|
||||||
|
{
|
||||||
|
$table->dropColumn('file');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::table('tps_shops_reports', function($table)
|
||||||
|
{
|
||||||
|
$table->text('file');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -81,3 +81,6 @@
|
||||||
1.0.28:
|
1.0.28:
|
||||||
- 'Updated table tps_shops_sales'
|
- 'Updated table tps_shops_sales'
|
||||||
- builder_table_update_tps_shops_sales_2.php
|
- builder_table_update_tps_shops_sales_2.php
|
||||||
|
1.0.29:
|
||||||
|
- 'Updated table tps_shops_reports'
|
||||||
|
- builder_table_update_tps_shops_reports.php
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue