@soodomaa
Look for file: /resources/views/restaurantowner/viewOrder.blade.php
Look for this line:
<a href="javascript:void(0)" id="printButton" class="btn btn-sm btn-primary my-2" style="color: #fff; border: 1px solid #ccc; float: right;border-radius: 8px;"><i class="icon-printer mr-1"></i> Print Bill</a>
After it, on the second line, paste the following code:
<a href="{{ route('admin.printThermalBill', $order->unique_order_id) }}" id="printButton" class="btn btn-sm btn-success my-2 mx-2" style="color: #fff; border: 1px solid #ccc; float: right;border-radius: 8px;"><i class="icon-printer mr-1"></i> Print Thermal Bill</a>
Your code should look now like this:
<a href="javascript:void(0)" id="printButton" class="btn btn-sm btn-primary my-2" style="color: #fff; border: 1px solid #ccc; float: right;border-radius: 8px;"><i class="icon-printer mr-1"></i> Print Bill</a>
<a href="{{ route('admin.printThermalBill', $order->unique_order_id) }}" id="printButton" class="btn btn-sm btn-success my-2 mx-2" style="color: #fff; border: 1px solid #ccc; float: right;border-radius: 8px;"><i class="icon-printer mr-1"></i> Print Thermal Bill</a>
<div class="clearfix"></div>
Next, find the file /routes/storeroutes.php
Look for line 59 or for the code:
Route::get('/order/{order_id}', 'RestaurantOwnerController@viewOrder')->name('restaurant.viewOrder');
After it, paste the following line:
Route::get('/printbill/{order_id}', 'AdminController@printThermalBill')->name('admin.printThermalBill');
Enjoy 🙂