Skip to content

Instantly share code, notes, and snippets.

View christmex's full-sized avatar

Jonathan C christmex

View GitHub Profile
@christmex
christmex / custom-paginator.blade.php
Created April 1, 2023 02:23 — forked from IlijaT/custom-paginator.blade.php
Laravel Livewire Custom Pagination With Tailwind
@if ($paginator->hasPages())
<div class="flex items-end my-2">
@if ( ! $paginator->onFirstPage())
{{-- First Page Link --}}
<a
class="mx-1 px-4 py-2 bg-blue-900 border-2 border-blue-900 text-white font-bold text-center hover:bg-blue-400 hover:border-blue-400 rounded-lg cursor-pointer"
wire:click="gotoPage(1)"
>
<<
@christmex
christmex / laravel-uuid-guide.md
Created April 26, 2022 00:10 — forked from whoisryosuke/laravel-uuid-guide.md
Laravel - Enabling UUID for model (v6 tested) -- uses \Illuminate\Support\Str::uuid

Migrations

Add UUID (or swap bigIncrement) and make sure to set as primary column:

        Schema::create('events', function (Blueprint $table) {
            $table->uuid('id')->primary();

When using the column as a foreign key in a pivot table, create a UUID column and do the same foreign key assignment: