Hi, i am trying to submit data to my laravel backend using axios. I need to be able to capture the id of the client that the engagement will be linked to and im struggling to understand how i can access that information so i can send it with the post request.
From here it would be process by the EngagementsController...
So currently i have the the client_id as a basic input but Im wondering if there is away to capture the id of the client i am trying to create the engagement for because in laravel the engagement will have belongsTo() relationship with the client.
The client id is supposed to be referencing my client table and i dont know how to capture that data without having to manually put it in each time before submitting
Form data post to Laravel backend
Hi, i am trying to submit data to my laravel backend using axios. I need to be able to capture the id of the client that the engagement will be linked to and im struggling to understand how i can access that information so i can send it with the post request.
this is the form component
this is the form component data
this is the form component method
Now when i capture the data from here it dispatches my store for the method addEngagement below
and sends it the laravel backend to my api route here
From here it would be process by the EngagementsController...
So currently i have the the client_id as a basic input but Im wondering if there is away to capture the id of the client i am trying to create the engagement for because in laravel the engagement will have belongsTo() relationship with the client.
The client id is supposed to be referencing my client table and i dont know how to capture that data without having to manually put it in each time before submitting
this is the controller handling the form post
Hopefully I am being detailed enough on what my issue is. Please as for my more clarity if needed!!