/** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index($mainflowTypeId) { $detailingflowTypes = DetailingflowType::whereMainflowTypeId($mainflowTypeId)->get(); return response()->json(['detailingflow_types' => $detailingflowTypes]); }