Relative Content

Tag Archive for laravellaravel-backpack

Adding fixed value to create and update in Laravel using Backpack

Was wondering what would be the right way to this?
Trying out Backpack and ran into simple issue. I have Post and User and there is User hasMany Post relation. Now since I have CrudController how would go about setting current backpack_user() as Post User. I mean I can hook model events (https://laravel.com/docs/11.x/eloquent#events) and do it that way, but it seems bit of an hassle. Didn’t find from Backpack docs whether there is better way or not.