mercredi 1 mars 2017

How do I use two columns in two tables to fill in another in Laravel 5?

I have two tables one table_response with the following columns response_id, organization etc. The organization is not known.

I have a table_request with following columns request_id, organization etc. Here, the organization is known.

I send a request and generate a request_id stored as request_id on table table_request. This request_id is attached to a specific organization on the same table.

When the response is received I generate a response_id and save it on table_response.

The request_id and response_id are the same though in different tables.

I just can not figure out a way to use the request_id and response_id to populate the organization on table_response. Like compare request_id and response_id if same then fill that row on table_response as for organization X.

Would someone kindly guide me in laravel5.3?

Regards.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire