Skip to content

Cannot use simialbi\yii2\schemaorg\models\Product as Product because the name is already in use #8

Answered by simialbi
toantrungtinh asked this question in Q&A
Discussion options

You must be logged in to vote

What's the exact problem? Can't you use 2 classes with the name product in the same e.g. Controller? You could import simialbi\yii2\schemaorg\models\Product with an alias (see https://www.php.net/manual/en/language.namespaces.importing.php).
E.g.

use simialbi\yii2\schemaorg\models\Product as SchemaProduct;

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by simialbi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants