Skip to content

Instantly share code, notes, and snippets.

View AbdullahiAbdulkabir's full-sized avatar
🏢
Working from home

Abdullahi Abdulkabir AbdullahiAbdulkabir

🏢
Working from home
View GitHub Profile
@AbdullahiAbdulkabir
AbdullahiAbdulkabir / How-to.txt
Created December 24, 2021 11:31
Simple pagination with Laravel format
1. Import or use component above like this `<SimplePagination :pagination="paginationData" :callback="getApplications" />`
2. paginationData is the whole data coming from the laravel endpoint with has the pagination and data in it
3. getApplications is the method that fetch the applications on first load and keeps fetching the values.
@AbdullahiAbdulkabir
AbdullahiAbdulkabir / Datatable.vue
Last active November 24, 2021 12:19
Data table component for vue expecting data been paginated informations
<template>
<div class="dataTables_wrapper dt-bootstrap4 no-footer">
<spinner
:showFull="true"
:loadingText="actionTypeText"
v-if="processingStuff || showFullLoader"
></spinner>
<div class="row">
<div class="col-sm-12 col md-6">
<div class="btn-group" role="group" aria-label="Actions">
const getSleepHours = day => {
if (day === 'monday') {
return 8;
} else if (day === 'tuesday') {
return 7;
} else if (day === 'wednesday') {
return 6;
} else if (day === 'thursday') {
return 5;
} else if (day === 'friday') {