# getModel() method error: is not a registered container key

**URL:** <https://forum.mautic.org/t/getmodel-method-error-is-not-a-registered-container-key/15018>\
**Category:** Development\
**Tags:** development\
**Created:** [June 30, 2020, 12:47pm UTC](https://forum.mautic.org/t/getmodel-method-error-is-not-a-registered-container-key/15018 "2020-06-30T12:47:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![alfredoct96](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/alfredoct96/32/608_2.png) [@alfredoct96](https://forum.mautic.org/u/alfredoct96)\
**Post date:** [June 30, 2020, 12:47pm UTC](https://forum.mautic.org/t/getmodel-method-error-is-not-a-registered-container-key/15018/1 "2020-06-30T12:47:36Z")

</div>

An exception occurred when i call `$this->getModel('customdashboard.embed')` inside my Controller.

I used the correct nomenclature (mautic.UNIQUE\_BUNDLE\_IDENTIFIER.model.MODEL\_IDENTIFIER), plugin’s name is CustomDashboardBundle and my model inside Model directory is EmbedModel and extends CommonModel ( i tried to extend also FormModel ).

The exception occurred when i try the route that call controller’s action with $this-\>getModel(‘customdashboard.embed’) is  
InvalidArgumentException: “mautic.customdashboard.model.embed is not a registered container key.” at ModelFactory.php .

I followed documentation and don’t know what can be the problem, anyone can help me?
