Hey I want to send user role(using Spatie) as props with backend in every route to show different views based on role and permissions in Vuejs.
<!-- Navigation Links -->
<div v-if="user.role == 'admin'" class="hidden space-x-8 sm:-my-px sm:ml-10 sm:flex max-w-xl md:max-w-7xl flex-wrap justify-around">
<NavLink :href="route('dashboard')" :active="route().current('dashboard')">
Dashboard
</NavLink>
</div>
even if could send user role in every route by a middleware or something like that would be good.
do you have any idea?