Mar 14, 2019
0
Level 4
Pass data from Nova Resource to FormField
I created a custom Field in Nova and I want to show a list of category in the view and a checkbox will associate with each category.
I already have a recursive array of the category in my resource file but I don't know how to pass it to FormField?
Here is my code:
Category Resource
$resourceId = $request->route()->parameter('resourceId');
$categories = app(self::$model)->where('id', '!=', $resourceId)->orderBy('position', 'ASC')->get()->toTree();
Thank you for your help!!!
Please or to participate in this conversation.