Skip to content

Instantly share code, notes, and snippets.

@iskandervdh
iskandervdh / inertia.php
Created January 2, 2026 12:30
Laravel Inertia Vite React SSR
// config/inertia.php
<?php
return [
// ...
'ssr' => [
'enabled' => true,
'url' => 'http://127.0.0.1:' . (env('VITE_SSR_PORT', 13714)),
@iskandervdh
iskandervdh / router.options.ts
Created September 7, 2023 17:12
Nuxt 3 subdomains
/* app/router.options.ts */
import type { RouteRecordRaw } from 'vue-router'
import type { RouterConfig } from '@nuxt/schema'
const SUBDOMAINS = ['dashboard', 'admin'] as const
// Replace the available routes with only the routes that are available on that subdomain
function subdomainRoutes(subdomain: string, defaultRoutes: RouteRecordRaw[]) {