I am using the Yii 2 framework how can I use my backend model with my frontend controller Have tried the code.
$ tnc = new \ app \ model \ payment methods \ terms and rules (); But I got this error
class "ap" model \ payments mode \ rules and condition 'not found < / Div>
The namespace for backend is backend , so you should just try:
$ tnc = \ backend \ model \ payments mode \ terms and rules (); In the advanced application template, each level has its own root area, for example, the front end level has a root alias
@frontend, while The back-end tier root area is@backendAs a result, you can insert front-end classes under the name space<< code> backend Classes can be automatically loaded by Yii autoloader.
Read more:
No comments:
Post a Comment