Head Component
Much like the Head Component from Inertia.js, Laravext has its own Head
component that allows you to set the title of the page.
- React
- Vue
page.jsx
:
import { Head, nexusProps } from "@laravext/react";
export default () => {
const { teams } = nexusProps();
return (
<div>
<Head title="Our Teams" />
{/* The Rest of your component */}
</div>
)
}
page.vue
:
<script setup>
import { inject } from 'vue';
import { Head } from '@laravext/vue3'
const nexusProps = inject('$nexusProps');
const {teams} = nexusProps();
</script>
<template>
<Head title="Our Teams" />
<!-- The Rest of your component -->
</template>