Laravel
Install and configure Laravel with Inertia
Note: The following guide is for Tailwind v4. If you are using Tailwind v3, use [email protected]
.
Create project
Start by creating a new Laravel project with Inertia and Vue using the laravel installer laravel new my-app
:
bash
laravel new my-app --vue
Add Components
You can now start adding components to your project.
pnpm dlx shadcn-vue@latest add switch
The command above will add the Switch
component to resources/js/components/ui/switch
. You can then import it like this:
vue
<script setup lang="ts">
import { Switch } from '@/Components/ui/switch'
</script>
<template>
<div>
<Switch />
</div>
</template>