-
Description:When a table's updated_by or created_by columns are customized on a table, and a belongsToMany relation is setup with timestamps, a request via the relation generates an exception as it requests the timestamp columns of the source table, and not of the pivot table. Steps To Reproduce:GitHub repository demonstrating the issue: https://github.com/kassah/belongsToManyTimeStampIssue Steps:
What was expected:
Inside the repository I created a test that does step 7. I added a GitHub Action that runs the failing test: https://github.com/kassah/belongsToManyTimeStampIssue/runs/4296023048?check_suite_focus=true I also set it to run the tests just prior to changing the source tables to demonstrate the test works just prior to updating the column names. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I believe the code is clear on this one, you should be using |
Beta Was this translation helpful? Give feedback.
I believe the code is clear on this one, you should be using
withTimestamps('created_at', 'updated_at')