The model of this package causing issue in tinker (URGENT)
Example I have model Product will return error when I try to run (my model) Product::find(1); in tinker, the issue I notice when I have model same name in package(this package) model.
suggestion make the model of this package unique ex. wooProduct wooOrder don't used common name.
error: Exception with message 'cURL Error: Could not resolve host: YOUR_WEBSITE_URL'

Hello @ayophanz,
Thanks for your suggestion. Yes, you are right we should use a unique name when something writes in global space. Since we are using a unique custom namespace so we can use the same model name in a different namespace. If you have the same model name in your own namespace and you want both then use like this
use Product as WooProduct;
OR
use Codexshaper\WooCommerce\Models\Product as WooProduct;
Hope it will solve your issue.
I already do this works fine but this is not the issue the issue when you try to run in tinker. Pls try it on your self. Create a model the same name in the package model and run the tinker then call the model like this ex Product::find(1); and you will see the issue.
Thanks
On Tue, Feb 9, 2021, 1:09 PM Md. Abu Ahsan Basir [email protected] wrote:
Hello @ayophanz https://github.com/ayophanz,
Thanks for your suggestion. Yes, you are right we should use a unique name when something writes in global space. Since we are using a unique custom namespace so we can use the same model name in a different namespace. If you have the same model name in your own namespace and you want both then use like this
use Product as WooProduct;
OR
use Codexshaper\WooCommerce\Models\Product as WooProduct;
Hope it will solve your issue.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Codexshaper/laravel-woocommerce/issues/63#issuecomment-775667628, or unsubscribe https://github.com/notifications/unsubscribe-auth/AF3RLUFWZV2XDF5CBROYDZDS6C7R7ANCNFSM4XIQPQ3Q .