Running into a strange problem. I am using Jetstream for one of my projects which uses vite to compile assets. When I checked inertia component the version was returning null.
When I set ASSET_URL in .env file I started getting the version but it doesn't change even when there is a change in my front end asset.
I saw in the vite document that it suggested me to do this
public function version(Request $request): ?string
{
return vite()->getHash();
}
but when I do this it throws an error
Call to undefined function App\Http\Middleware\vite()