Card that shows SoundCloud follower count using the SoundCloud REST API.
Does not update live.
| .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%); |
| <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" |
| <?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. |