I have a question about relationship tables in Laravel. I have a table "revisions" wherein I have columns "old_value" and "new_value". This table stores the change history records. The problem is when i want return records with table "revision" on page. The return value is, example:
"User Jack change name products from 1 to 2"
but I want to be the return value:
"User Jack change name products from BALL to SHOES"
Is there a way to combine the relationship table "revision" of the table "products", "articles" and "categories". For example based on the value of the columns "revisionable_type" or "key". The problem is that to columns "old_value" and "new_value" saved is records from columns "article_id", "category_id" with table "products" and colums "id" with table "articles" and colums "id" with table "categories"
Screen table: "revision":http://iv.pl/images/78755893242784790812.png
Screen table: "products":http://iv.pl/images/82849082096359450147.png
Screen table: "articles":http://iv.pl/images/81440394780221859215.png
Screen table: "categories":http://iv.pl/images/03724618899545660879.png