dev
Aji Kamaludin 1 year ago
parent 071097f3c1
commit 4ddd8aa562
No known key found for this signature in database
GPG Key ID: 19058F67F0083AD3

@ -16,7 +16,7 @@ class HomeController extends Controller
{ {
$infos = Info::where('is_publish', 1)->orderBy('updated_at', 'desc')->get(); $infos = Info::where('is_publish', 1)->orderBy('updated_at', 'desc')->get();
$banners = Banner::orderBy('updated_at', 'desc')->get(); $banners = Banner::orderBy('updated_at', 'desc')->get();
$locations = Location::get(); $locations = Location::orderBy('updated_at', 'desc')->get();
$vouchers = Voucher::with(['location']) $vouchers = Voucher::with(['location'])
->where('is_sold', Voucher::UNSOLD) ->where('is_sold', Voucher::UNSOLD)
->groupBy('batch_id') ->groupBy('batch_id')

@ -9,10 +9,10 @@ class LocationController extends Controller
{ {
public function index() public function index()
{ {
$query = Location::paginate(); $query = Location::orderBy('updated_at', 'desc');
return inertia('Location/Index', [ return inertia('Location/Index', [
'query' => $query, 'query' => $query->paginate(),
]); ]);
} }

Loading…
Cancel
Save