🚀
Launch Stack
Website
  • Welcome
  • Get Started
  • Stack
  • Updates
  • 📡Backend
    • Introduction
    • Application Structure
    • Config
    • API
    • Authentication
      • Email and Password
      • Social Login
    • Debugging
    • Environment Variables
    • File Uploads
    • Logging
    • Mail
    • Handling Errors [Sentry]
    • Notifications
      • Email Notifications
      • In-App Notifications
    • Payments [Stripe]
    • Payments [Paddle]
    • Routing
    • Testing
      • Feature Tests
      • Browser Tests
  • 🛡️Frontend
    • Introduction
    • Routing
    • Tailwind and SCSS
    • Views
    • Layouts
    • Components
      • Command Palette
      • Feedback
      • Form
      • Modal
      • Pagination
    • i18n
  • 🖥️App
    • Account
    • API
    • Billing
    • Team Members
    • Team Settings
  • ⚙️Admin
    • Introduction
    • Team Management
    • User Management
    • Notifications
    • Feedback
    • Blog Management
Powered by GitBook
On this page

Was this helpful?

  1. Frontend

Introduction

PreviousBrowser TestsNextRouting

Last updated 9 months ago

Was this helpful?

The front end in LaunchStack it's built on and .

How it works

Inertiajs it's an interface between the backend (Laravel) and the frontend framework (vue), example of sending data from controller to view:

use Inertia\Inertia;
use App\Models\Post;

class PostsController extends Controller
{
    public function index()
    {
        $posts = Post::latest()->paginate(10);
        
        return Inertia::render('Posts/Index', [
            'posts' => $posts
        ]);
    }
}

Posts/Index.vue

<script setup>
const { posts } = defineProps({
    posts: Object,
});
</script>
<template>
    
    <div v-for="post in posts" :key="post">
        {{ post.title }}
    </div>
    
</template>
🛡️
inertiajs
vue 3