[英]Return relationship data along with the new Model object when saving the new Model using the save() method
我想在不對數據庫進行額外查詢的情況下訪問新的Post的User 。 如果我執行以下操作,它將查詢User的數據庫: 我知道我可以只做$userPost = $user ,但出於某些原因,我不想那樣做。 所以我的問題是,在使用save()新Post時是否可以預先加載User ? ...