I have a
Category model and need to
store new categories by receiving the category hierarchy from input as a
And I want to only add the categories that already have a parent, but at the same time return the parent_id to the controller in the validation (in case it exists), so only one database request is performed, instead of 2 (one in validation and another one to get the
Is it good practice to build a Form Request that performs this validation and which passes the
parent_id to the controller by adding it to the returned array ? Or is there a better way to achieve this ?