I wanted to call controller action or controller function from view file.
but i know $this->element() is not very good for my work , because i should create element file in element directory .
there is way that i Call Controller Action or Controller Function From Views .
thanks.
I wanted to call controller action or controller function from view file. but i
Share
You should use
requestAction(string $url, array $options)to retrieve data. Read the documentation on how to use it.And note that it is not a recommended approach, since it can affect your app’s performance.
Hope it helps!