This project contains a very small example that shows how you can detect changes in a form, just in case you want to cancel the edition, you can use the change detector composable to alert the user about losing data.
This project uses Laravel, Inertia and VueJS because is the stack that uses the main project were this code might be used.
git clone https://github.com/jorgecortesdev/change-detection-example.git
cd change-detection-example
composer install
cp .env.example .env
npm install
npm run dev
After the installation you might use this as any regular Laravel project, the form example is shown in the welcome page.
The Laravel framework is open-sourced software licensed under the MIT license.