Skip to content

Instantly share code, notes, and snippets.

View atomjoy's full-sized avatar

Atomjoy atomjoy

View GitHub Profile
@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
@atomjoy
atomjoy / LaravelInertiaTable.md
Created September 4, 2026 09:32
Laravel Inertia table.

Laravel Inertia Table

Backend

<?php

namespace App\Http\Controllers;

use App\Models\Todo;
@atomjoy
atomjoy / Composable.md
Last active September 4, 2026 08:19
Composable przykłady

Composable

Możesz zaimportować useCounter w kilku różnych komponentach, a każdy z nich będzie miał swój własny, niezależny licznik. Cała logika licznika jest poza komponentem wizualnym.

Tworzenie

composable.ts

import { ref } from 'vue'
@atomjoy
atomjoy / TanstackUseQuery.md
Last active September 4, 2026 09:31
Tanstack query

Tanstack Query

TanStack Query (dawniej znany jako React Query) to potężna biblioteka do zarządzania asynchronicznym stanem aplikacji (tzw. server state). Pomaga w pobieraniu (fetching), cache'owaniu, synchronizowaniu oraz aktualizowaniu danych pochodzących z serwera, eliminując potrzebę pisania skomplikowanego kodu opartego na useEffect i useState.

Install

npm i @tanstack/vue-query
npm i @tanstack/vue-table
@atomjoy
atomjoy / PublicDirectoryProvider.php
Created September 2, 2026 15:11
PublicDirectoryProvider Laravel
<?php
// php artisan storage:link
namespace App\Providers;
use Carbon\CarbonImmutable;
use Illuminate\Support\Facades\Date;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\ServiceProvider;
use Illuminate\Validation\Rules\Password;
@atomjoy
atomjoy / Laravel-Modules.md
Last active September 1, 2026 12:03
Laravel modules in custom location with Laravel 13, Vue and Inertia.

Laravel Custom Modules

Custom modules location modules/{Module} in Laravel project.

Composer

composer.json

{
@atomjoy
atomjoy / Lead-Pipeline-Panel.html
Last active August 28, 2026 12:04
Lead pipeline panel in html, js.
<!doctype html>
<html lang="pl">
<head>
<meta charset="UTF-8" />
<title>CRM Pipeline</title>
<style>
* {
box-sizing: border-box;
margin: 0;
@atomjoy
atomjoy / fonts.css
Last active August 27, 2026 16:39
Import Poppins fonts from local server.
/*
Download fonts here:
https://fontsource.org/fonts/poppins/install
unzip all font files from static directory to fonts/poppins
More fonts:
https://www.npmjs.com/package/@fontsource/poppins
https://github.com/fontsource/font-files/tree/main/fonts/google/poppins/files
*/
@atomjoy
atomjoy / Curl-No-Cache.md
Last active August 27, 2026 15:05
Curl no-cache example.

Curl no cache

curl http://https://example.com/main.js?random
curl -H 'Pragma: no-cache' https://example.com/main.js
curl -H 'Cache-Control: no-cache' https://example.com/main.js

Curl show headers