mirror of
https://gitlab.com/omair-personal/exchange.git
synced 2026-08-19 12:34:13 +00:00
attempt to fetch user bankslip
This commit is contained in:
@@ -144,8 +144,8 @@ class BookingController extends Controller
|
||||
public function adminShow($id)
|
||||
{
|
||||
$booking = Booking::where('id', $id)->first();
|
||||
return $booking->userBankSlip()->get();
|
||||
|
||||
$booking->user_bankslip_path = $booking->userBankSlip()->first()->bankslip_path;
|
||||
|
||||
if($booking){
|
||||
$date1 = new DateTime($booking->created_at);
|
||||
$date2 = new DateTime();
|
||||
@@ -315,7 +315,7 @@ class BookingController extends Controller
|
||||
$unique_name = 'bank_slip_' . md5($filename. time()); // probably not a good idea
|
||||
$unique_image_path = $unique_name. '.' .$ext;
|
||||
Storage::putFileAs(
|
||||
'user_bankslip', $bankslip_file, $unique_image_path
|
||||
'user_bankslip', $bankslip_file, $unique_image_path, 'public'
|
||||
);
|
||||
|
||||
$user_bankslip = new UserBankSlip;
|
||||
@@ -372,7 +372,7 @@ class BookingController extends Controller
|
||||
$unique_name = 'purchase_order_' . md5($filename. time());
|
||||
$unique_image_path = $unique_name. '.' .$ext;
|
||||
Storage::putFileAs(
|
||||
'purchase_order',/*folder name*/ $user_input_file, $unique_image_path
|
||||
'purchase_order',/*folder name*/ $user_input_file, $unique_image_path, 'public'
|
||||
);
|
||||
|
||||
$user_po = new PurchaseOrder;
|
||||
@@ -553,7 +553,7 @@ class BookingController extends Controller
|
||||
$unique_name = 'invoice' . md5($filename. time());
|
||||
$unique_file_url = $unique_name. '.' .$ext;
|
||||
Storage::putFileAs(
|
||||
'invoice',/*folder name*/ $input_file, $unique_file_url
|
||||
'invoice',/*folder name*/ $input_file, $unique_file_url, 'public'
|
||||
);
|
||||
|
||||
$invoice = new Invoice;
|
||||
|
||||
@@ -198,7 +198,7 @@
|
||||
</div>
|
||||
<el-row :gutter="12">
|
||||
<el-col :span="22" style="text-align:center">
|
||||
<img src="http://via.placeholder.com/600x400" class="image">
|
||||
<img v-bind:src="'public/storage/user_bankslip/' + booking_details.user_bankslip_path" class="image">
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
@@ -235,7 +235,8 @@
|
||||
id: null,
|
||||
amount: null,
|
||||
bia: null,
|
||||
}
|
||||
user_bankslip_path: null,
|
||||
},
|
||||
}
|
||||
},
|
||||
beforeCreate () {
|
||||
|
||||
Reference in New Issue
Block a user