You can alias them.. e.g.
use App\Supplier;
use App\Product;
use Codexshaper\WooCommerce\Facades\Product as WCProduct;
Then you'd use WCProduct or whatever you want to call it when you need to call it.
Hi i using this package to get all the data from a ecommerce with woocomerce
https://github.com/Codexshaper/laravel-woocommerce
and i would like to use this on my Products controller to get the products from woocomerce and if doesnt exist create the products, but i got this error because i have already a model called "Product" on my laravel system. This secction is from the part when you call all the models that you want to use
use App\Supplier;
use App\Product;
use Codexshaper\WooCommerce\Facades\Product;
and obiusly i got the error: Cannot use App\Product as Product because the name is already in use how can i use both?? i need to use both because i do others eloquent querys with the main product model from laravel
You can alias them.. e.g.
use App\Supplier;
use App\Product;
use Codexshaper\WooCommerce\Facades\Product as WCProduct;
Then you'd use WCProduct or whatever you want to call it when you need to call it.
Please or to participate in this conversation.