Graphql with
-
bagisto 1.4.5 its work well with Graphql when install LaravelMultiVendorMarketplace extension
show this error
PHP 8.1.0
Type of Webkul\GraphQLAPI\Cart::$cartRepository must not be defined (as in class Webkul\Checkout\Cart)
vendor\bagisto\graphql-api\src\Cart.php : 14
can you help me? -
Hi there,
Can you please share the steps which you are following for installing?
-
Hi ,
When installed LaravelMultiVendorMarketplace without graphql, everything works fine.The same steps as in the ReadMe file :
Installation:- Unzip the respective extension zip and then merge "packages" and "storage" folders into project root directory.
- Goto config/app.php file and add following line under 'providers'
Webkul\Marketplace\Providers\MarketplaceServiceProvider::class
- Goto composer.json file and add following line under 'psr-4'
"Webkul\\Marketplace\\": "packages/Webkul/Marketplace/src"
- Run these commands below to complete the setup
composer dump-autoload
composer require laravel/helpers
php artisan optimize
php artisan migrate
php artisan route:cache
php artisan db:seed --class=Webkul\\Marketplace\\Database\\Seeders\\DatabaseSeeder If your are windows user then run the below command- php artisan db:seed --class="Webkul\Marketplace\Database\Seeders\DatabaseSeeder"
php artisan vendor:publish --force
-
Hi @boucherf,
Something went wrong in the installation.
Please verify and follow the below installation process.
Marketplace installation Guide- https://webkul.com/blog/laravel-multi-vendor-marketplace/
GraphQL installation Guide:- https://github.com/bagisto/headless-ecommerce#bagisto-graphql-api
-
@Amitk-Webkul said in Graphql with:
in the installation.
The problem is solved
After installation, we compared cart.php and cart.php befor instllation, we find protect variable not exist in the original(
protected $cartRepository;
protected $cartItemRepository;
protected $cartAddressRepository;
protected $productRepository;
protected $taxCategoryRepository;
protected $wishlistRepository;
protected $customerAddressRepository;
protected $mpProductRepository;
)
We deleted it
The question is whether it affects other functionality of the site or not ? -
Can you please let us the installed version of the LaravelMultiVendorMarketplace extension?
-
@Vivek-Webkul said in Graphql with:
LaravelMultiVendorMarketplace
bagisto 1.4.5 and LaravelMultiVendorMarketplace 1.4.5
-
@boucherf said in Graphql with:
We deleted it
The question is whether it affects other functionality of the site or not?Not, It will not affect the other functionality, adding a protected access modifier will work fine.