Skip to content

Instantly share code, notes, and snippets.

View abishekrsrikaanth's full-sized avatar
🏠
Working from home

Abishek R Srikaanth abishekrsrikaanth

🏠
Working from home
  • Greenlyst Inc.
  • Bangalore, India
View GitHub Profile
@abishekrsrikaanth
abishekrsrikaanth / tw-skeleton.css
Created December 29, 2020 13:31 — forked from acidjazz/tw-skeleton.css
tailwind skeleton css
.skeleton {
--text-opacity: 0;
background-image: linear-gradient(100deg, #edf2f7 0%, #f4f7fa 20%, #edf2f7 40%);
background-position: 50%;
background-size: 200%;
animation: skeleton 1.25s infinite linear;
}
.skeleton-teal {
background-image: linear-gradient(100deg, #b4c5f8 0%, #cad8f9 20%, #b4c5f8 40%);
@abishekrsrikaanth
abishekrsrikaanth / Media.blade.php
Created June 19, 2020 18:54 — forked from tanthammar/Media.blade.php
LiveWire Spatie Media Image upload with VueCroppa
<div id="media-comp" class="display-contents">
<media inline-template>
<form>
<div v-for="(image, index) in form" :key="index" @touchstart.stop @mousedown.stop class="col-span-6">
<h3 class="text-3xl font-medium">@{{ image.label }}</h3>
<p class="py-3">Allowed Width @{{image.width}}px, Height @{{image.height}}px, Max file size @{{image.maxFileSize}}</p>
<input v-model="image.value" wire:model="@{{ image.name }}" type="hidden">
<croppa v-model="image.model" :width="image.width" :height="image.height"
:placeholder="locale == 'sv' ? 'Välj en bild' : 'Choose an image'"
:accept="'image/*'" :file-size-limit="image.maxByte" :zoom-speed="3" :disable-drag-and-drop="false"

SoundCloud Follower Count

Card that shows SoundCloud follower count using the SoundCloud REST API.

Does not update live.

A Pen by jczimm on CodePen.

License.

SoundCloud Follower Count

Card that shows SoundCloud follower count using the SoundCloud REST API.

Does not update live.

A Pen by jczimm on CodePen.

License.

<?php
public function fields(Request $request)
{
return [
// ... All your other fields here
GroupByTool::make()
->usingModel(EventRegistration::class)
->selectColumns([
const { data } = await Nova.request().post('/nova-vendor/tool_name_goes_here/get-grouped-data', {
model: this.model,
group_by: this.groupBy,
select_columns: this.selectColumns,
resource_id: this.resource_id,
using_where: this.usingWhere
});
<script>
export default {
props: ['resourceName', 'resourceId', 'panel'],
data () {
return {
data: []
}
},
<?php
namespace WorkDoneRight\GroupByTool\Controllers;
use Illuminate\Database\Query\Builder;
use Illuminate\Support\Str;
use Laravel\Nova\Http\Requests\NovaRequest;
class GroupedViewController
{
<template>
<div>
<h1 class="text-90 font-normal text-2xl mb-6">{{groupTitle}}</h1>
<div class="card">
<table class="w-full table mb-6 py-3 px-6 ">
<thead>
<tr>
<th v-for="column in data.columns">{{column}}</th>
</tr>
</thead>
<?php
namespace Workdoneright\GroupByTool;
use Laravel\Nova\ResourceTool;
class GroupByTool extends ResourceTool
{
/**
* Get the displayable name of the resource tool.