Answer the question
In order to leave comments, you need to log in
How to pull out the same name value from two different tables and operate with it?
Good day.
There are two different tables "Purchases" and "Sales", they have the same column, you need to take its values and manipulate it, how can this be done?
Answer the question
In order to leave comments, you need to log in
// Если созданы модели
$sales = Sales::find(1);
$purchases = Purchases:find(1);
$sales_column = $sales->any_column;
$purchases_column = = $purchases->any_column;
manipulation($sales_column , purchases_column );
$sales->update();
$purchases->update();
Everything is here: database , eloquent
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question