Server push fixed report saving on server

This commit is contained in:
root 2023-08-04 09:06:37 +00:00
parent f2b99b29a6
commit 67b594899a
4 changed files with 30 additions and 4 deletions

View File

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

View File

@ -10,11 +10,11 @@ fields:
type: text
file:
label: File
span: auto
mode: file
fileTypes: 'zip,rar'
useCaption: true
thumbOptions:
mode: crop
extension: auto
fileTypes: 'zip,rar'
span: auto
type: fileupload

View File

@ -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');
});
}
}

View File

@ -81,3 +81,6 @@
1.0.28:
- 'Updated table tps_shops_sales'
- builder_table_update_tps_shops_sales_2.php
1.0.29:
- 'Updated table tps_shops_reports'
- builder_table_update_tps_shops_reports.php