Skip to content

Instantly share code, notes, and snippets.

View atomjoy's full-sized avatar

Atomjoy atomjoy

View GitHub Profile
@atomjoy
atomjoy / Firefox-Border-Radius-Remove.md
Last active October 26, 2026 19:19
How to remove Firefox border radius.

Firefox border radius 158+

# W pasku firefox
about:config

# Set true
toolkit.legacyUserProfileCustomizations.stylesheets

# W pasku firefox
@atomjoy
atomjoy / DynamicFacets.php
Created October 19, 2026 09:29
Laravel dynamiczne fasetowanie
<?php
namespace App\Traits;
use Illuminate\Http\Request;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\DB;
trait DynamicFacets
{
@atomjoy
atomjoy / Laravel-Inertia-Canonical.md
Last active October 8, 2026 10:20
Laravel Inertia canonical.

Laravel Inertia Canonical

@php
    $allowedParams = array_filter(request()->only(['page', 'lang']));
    $canonicalUrl = !empty($allowedParams) ? url()->current() . '?' . http_build_query($allowedParams) : url()->current();
@endphp

<!DOCTYPE html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}"  @class(['dark' => ($appearance ?? 'system') == 'dark'])>
@atomjoy
atomjoy / Seo-Laravel-Vue-Inertia.md
Last active October 7, 2026 13:58
Laravel Vue Inertia json schema.

Seo Laravel Vue Inertia

How to inject json schema from Laravel with Inertia to app blade html head tag.

Vue PageSeo.vue component

To debilizm przekazywanie tego z Vue Inertia Head tworzy duplikaty jeżeli tag istnije w app.blade.php lepiej dodać to w blade!

<script setup lang="ts">
@atomjoy
atomjoy / Minimal-Html-Email.md
Created September 29, 2026 09:53
Minimal html email template.

Html email template

Minimal html email template.

<!DOCTYPE html>
<html>

<head>
  <meta charset="UTF-8" />
@atomjoy
atomjoy / Vue-Table-State-Watcher.md
Created September 12, 2026 10:01
Vue table state watcher

Vue Table Filters Watcher

Globalny stan aplikacji w vue, inertia z przekazywaniem i aktualizacją stanu z komponentu.

Composable watcher

// composable/useTableWatcher.ts
import { watch, type Ref } from 'vue'
import { router } from '@inertiajs/vue3'
@atomjoy
atomjoy / Laravel-Vue-Inertia-TableState.md
Last active September 11, 2026 09:48
Reaktywny stan aplikacji w Vue Inertia.

Table State Laravel Vue Inertia

Reaktywny stan aplikacji w Vue Inertia.

Funkcje

// helpers/useHelpers.ts
import { Ref } from 'vue'
@atomjoy
atomjoy / Filterable.php
Created September 10, 2026 12:50
Laravel Filterable
<?php
namespace App\Traits;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Support\Facades\Schema;
trait Filterable
{
/**
@atomjoy
atomjoy / Tanctack-Vue-Table-v9.md
Last active September 4, 2026 15:55
Tanstack Inertia Laravel Vue

Tanstack v9 Vue Inertia

Table with sorting, pagination, text search.

Controller

public function index(Request $request){
	$query = User::query();
@atomjoy
atomjoy / Tanctack-Vue-Table-v9-useQuery-Api.md
Last active September 4, 2026 16:05
Tanstack table with vue-table, vue-query Laravel 13 Vue Inertia API.

Tanstack v9 useQuery v5 Laravel Inertia Vue

Laravel 13 Inertia, Vue i zapytania z useQuery do api.

Instalacja

npm i @tanstack/vue-table@9
npm i @tanstack/vue-query@5