Skip to content

Instantly share code, notes, and snippets.

View herpaderpaldent's full-sized avatar

Herpaderp Aldent herpaderpaldent

View GitHub Profile
@herpaderpaldent
herpaderpaldent / Pagination.vue
Created January 11, 2020 08:51
LaravelCollectionPaginationComponent
<template>
<nav aria-label="pagination">
<ul class="pagination justify-content-end">
<li :class="['page-item', collection.meta.current_page <= 1 ? 'disabled' : '']">
<inertia-link class="page-link" :href="collection.links.first" tabindex="-2">First</inertia-link>
</li>
<li :class="['page-item', collection.meta.current_page <= 1 ? 'disabled' : '']">
<inertia-link class="page-link" :href="collection.links.prev" tabindex="-1">Previous</inertia-link>
</li>
select `location_id`
from `assets`
where `assetable_id` in (95725047, 96205695)
and `location_flag` in ('Hangar', 'AssetSafety', 'Deliveries')
and `item_id` in (select `item_id`
from ((select `item_id` from `assets` where `name_normalized` like 'ammo%')
union
(select `assets`.`item_id`
from `assets`
left join `universe_types` on `universe_types`.`type_id` = `assets`.`type_id`