Adding fixed value to create and update #1001
-
Was wondering what would be the right way to this? tried to add |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Finally found https://backpackforlaravel.com/docs/6.x/crud-operation-create#use-events-in-your-setup-method in the docs. This provides clear solution to the issue Post::creating(function($entry) {
$entry->user()->associate(backpack_user());
}); |
Beta Was this translation helpful? Give feedback.
-
Im glad you find it. I will close the issue, but please feel free to re-open or create a new one if needed. Cheers. |
Beta Was this translation helpful? Give feedback.
Finally found https://backpackforlaravel.com/docs/6.x/crud-operation-create#use-events-in-your-setup-method in the docs. This provides clear solution to the issue