# Model error while calling component

**URL:** <https://discourse.cakephp.org/t/model-error-while-calling-component/11885>\
**Category:** Need Help\
**Created:** [February 21, 2024, 4:51am UTC](https://discourse.cakephp.org/t/model-error-while-calling-component/11885 "2024-02-21T04:51:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![akashzepth](https://avatars.discourse-cdn.com/v4/letter/a/dbc845/32.png) [@akashzepth](https://discourse.cakephp.org/u/akashzepth)\
**Post date:** [February 21, 2024, 4:51am UTC](https://discourse.cakephp.org/t/model-error-while-calling-component/11885/1 "2024-02-21T04:51:32Z")

</div>

Hi,  
My controller name is TestController.php and I created TestComponent.php .  
Now when i am calling  
$this-\>Test-\>GetProjectCapexBudget($capex\_id,$cyear); from controller then error is coming Unknown method `GetProjectCapexBudget` called on `Cake\ORM\Table`📋

FYI i have loaded the component in controller like below  
public function initialize(): void {  
parent::initialize();  
;  
$this-\>loadComponent(‘Test’);  
}

Can anyone help me
