Describe the bug
I tried creating a new "model" using three inputs that are "wired" to their respective public variables in the livewire component class.
On the form I added "wire:submit="storeShop" which I would expect trigger the storeShop function that will create a new "Shop" model, but it didn't work.
I made sure to add the quickstart code to the my project in the same "Component" and "view" and those do work.
To Reproduce
Steps to reproduce the behavior:
- Go to https://gist.github.com/wotta/0c2efa1153052184186833695685b33b
- Add those files to a fresh project
- Create a
Shop model with the fields that I added.
- Register the livewire route.
- Go to 'project.test/shops'
- Fill the form
- See that the page gets refreshed and the url is : project.test/shops?
Expected behavior
I expected that the form wouldn't refresh the page but submit the function with the data that was filled in the input fields.
Screenshots
https://monosnap.com/file/s8qQqgmz9PgBokAzFylPrj3bjBkNXp
Desktop (please complete the following information):
- OS: MacOS 10.14.3 Beta (18D39a)
- Vivaldi | 2.6.1566.49 (Stable channel) (64-bit)
- Revision | d126d99a97ff62b9503aa8f44003e70741c4d90f
- JavaScript | V8 7.5.288.30
- Flash | 32.0.0.223 /Library/Internet Plug-Ins/PepperFlashPlayer/PepperFlashPlayer.plugin
- User Agent | Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.145 Safari/537.36 Vivaldi/2.6.1566.49
I hope somebody can help me.
Best regards,
Wouter.
Describe the bug
I tried creating a new "model" using three inputs that are "wired" to their respective public variables in the livewire component class.
On the form I added "wire:submit="storeShop" which I would expect trigger the
storeShopfunction that will create a new "Shop" model, but it didn't work.I made sure to add the quickstart code to the my project in the same "Component" and "view" and those do work.
To Reproduce
Steps to reproduce the behavior:
Shopmodel with the fields that I added.Expected behavior
I expected that the form wouldn't refresh the page but submit the function with the data that was filled in the input fields.
Screenshots
https://monosnap.com/file/s8qQqgmz9PgBokAzFylPrj3bjBkNXp
Desktop (please complete the following information):
I hope somebody can help me.
Best regards,
Wouter.