How can I share logic between the front end and back end in a Laravel/Inertia project?
I am creating a project to create journal entries for TTRPG games. We play in a few different settings and I want to incorporate an in world date for entries. I want to create an object that can share logic between the Vue components and the Laravel API, but I don’t really need to send the object itself back and forth, just the string representation of the in-world date. Is there a good way to share the logic for the date class between the front end and the backend without having to make requests for every manipulation of the date?