problem to insert a category in laravel
$businesscategory = new BusinessCategory();
$businesscategory->title = $request->title;
$businesscategory->parent_id = ($request->parent_id == 0) ? NULL : (int) $request->parent_id;
$businesscategory->save();
and i get the problem: InvalidArgumentException Illegal operator and value combination.
i check that and the problem its with parent_id i can to insert only a null but i whant to insert a id of category
thanks
someone?
facing the same issue
I'm sorry but do you find the solution?
yes i found a solution i build a function and inside the function i put the save() method for the categories save and after that i save regular with the laravel
Before creating the root just pass parent_id as null in your input array then try to create on your model
I had to delete my old records in order to solve this. The problem happens because when you have old records, lft and rgt are both null. However, those fields are need it in vendor/baum/baum/src/Baum/Move.php.
