You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
559 B
PHTML

<?php
namespace App\Http\Controllers\Customer;
use App\Http\Controllers\Controller;
use App\Models\Sale;
class TransactionController extends Controller
{
public function index()
{
$query = Sale::where('customer_id', auth()->id())
->orderBy('created_at', 'desc');
return inertia('Trx/Index', [
'query' => $query->paginate(),
]);
}
public function show(Sale $sale)
{
return inertia('Trx/Detail', [
'sale' => $sale->load(['items.voucher.location'])
]);
}
}