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

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

[Home](./index.md) &gt; [@loopback/rest](./rest.md) &gt; [createControllerFactoryForInstance](./rest.createcontrollerfactoryforinstance.md)

## createControllerFactoryForInstance() function

Create a controller factory function for a given instance

<b>Signature:</b>

```typescript
export declare function createControllerFactoryForInstance<T>(controllerInst: T): ControllerFactory<T>;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  controllerInst | <code>T</code> |  |

<b>Returns:</b>

`ControllerFactory<T>`


