File: D:/HostingSpaces/SBogers10/spire-checkout.komma-mediadesign.nl/app/KommaApp/Shop/ShopRoutes.php
<?php
namespace App\KommaApp\Shop;
use App\KommaApp\Shop\Catalog\Kms\CatalogService;
use App\KommaApp\Shop\Categories\Kms\CategoryController;
use App\KommaApp\Shop\Discounts\DiscountController;
use App\KommaApp\Shop\Products\Product\ProductController;
use App\KommaApp\Shop\Products\ProductComposite\ProductCompositeController;
use App\KommaApp\Shop\Products\ProductGroup\ProductGroupsController;
use Illuminate\Support\Facades\Route;
Route::group([
'middleware' => ['web'],
'prefix' => 'kms'
], function () {
Route::resource('/products', ProductController::class);
Route::resource('/productgroups', ProductGroupsController::class);
Route::resource('/productcomposites', ProductCompositeController::class);
Route::resource('/categories', CategoryController::class);
Route::get('api/categories', CategoryController::class.'@getCategoryStructureAsJson');
Route::post('api/categories', CategoryController::class.'@setCategoryStructureAsJson');
Route::resource('/discounts', DiscountController::class);
Route::get('/catalog/index', CatalogService::class.'@index'); //Note that this route hits a service. This is expected as it is hit from an artisan command and a future "index" button in the kms.
});
//Route::get('/shoppingcart', 'Shop\Cart\ShoppingCartController@index')->name('shoppingcart');
//Route::get('/addProductToShoppingcart', 'Shop\Cart\ShoppingCartController@addProductToShoppingcart');
//Route::post('/removeItemFromShoppingcart', 'Shop\Cart\ShoppingCartController@removeItemFromShoppingcart');
//Route::post('/setItemAmountInShoppingcart', 'Shop\Cart\ShoppingCartController@setItemAmountInShoppingcart');