info@hcodecraft.com +923430775533, +923129235681

Vue 3 Composition API with Laravel Inertia in 2026

March 26, 2026 Hcodecraft Team 1 min read 11 views
Vue 3 Composition API with Laravel Inertia in 2026

Setup

// Laravel Controller
                public function index()
                {
                    return Inertia::render('Dashboard', [
                        'users' => User::all()
                    ]);
                }

Vue 3 Component

<script setup>
                import { ref, computed } from 'vue'
                import { usePage } from '@inertiajs/vue3'

                const { users } = usePage().props

                const search = ref('')
                const filtered = computed(() => 
                    users.filter(u => u.name.includes(search.value))
                )
                </script>

TypeScript + Pinia make this stack production-ready.

H
Hcodecraft Team

Laravel & AI Development Experts

Sharing practical insights on modern web development, Laravel best practices, and AI integration since 2020.