20 lines
564 B
TypeScript
20 lines
564 B
TypeScript
/*
|
|
|--------------------------------------------------------------------------
|
|
| Inertia Preloaded File
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| Any code written inside this file will be executed during the application
|
|
| boot.
|
|
|
|
|
*/
|
|
|
|
import Inertia from '@ioc:EidelLev/Inertia'
|
|
|
|
Inertia.share({
|
|
errors: ({session}) => {
|
|
return session.flashMessages.get('errors')
|
|
},
|
|
request: ({ request }) => request,
|
|
isAdmin: ({ auth }) => auth.user?.isAdmin,
|
|
}).version(() => Inertia.manifestFile('public/assets/manifest.json'))
|