---
lang: en
title: 'API docs: rest.createcontrollerfactoryforclass'
keywords: LoopBack 4.0, LoopBack 4
sidebar: lb4_sidebar
permalink: /doc/en/lb4/apidocs.rest.createcontrollerfactoryforclass.html
---

<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@loopback/rest](./rest.md) &gt; [createControllerFactoryForClass](./rest.createcontrollerfactoryforclass.md)

## createControllerFactoryForClass() function

Create a controller factory function for a given class

<b>Signature:</b>

```typescript
export declare function createControllerFactoryForClass<T>(controllerCtor: ControllerClass<T>): ControllerFactory<T>;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  controllerCtor | <code>ControllerClass&lt;T&gt;</code> | Controller class |

<b>Returns:</b>

`ControllerFactory<T>`


