Alex
Open modal showing the edit view of a different resource
I have two different resources 'Verification' and 'Bookings'. Both resources are tied to the Booking model.
On my Verification page, I would like an action that opens a modal when clicked, displaying the edit form of the Booking resource within.
Please can somebody help explain how I could achieve this?
Many thanks in advance for any replies!
5 replies
UPDATE query error when submitting form
Here is the error i'm getting:
SQLSTATE[HY000]: General error: 1366 Incorrect integer value: '[]' for column 'requester_id' at row 1
update
bookings
SET requester_id
= [], bookings
.updated_at
= 2023-11-01 09:11:48 WHERE id
= 3
Flare link: https://flareapp.io/share/353BBd67
I'm not sure why it is trying to run this update query and what the point of it is. Immediately before, it successfully runs an INSERT query as expected that adds the booking to the database, including the correct requester_id that is selected within the form.
Here is a Gist link to my BookingResource.php file:
https://gist.github.com/alexb34n/adc3f7f26f7f94efccd26d6c1aa4f36f
Apologies in advance if it's anything really simple. I'm relatively new to this so still finding my feet.2 replies