sarga/packages/Webkul/API/Http/api.php

39 lines
1.4 KiB
PHP
Raw Normal View History

2018-11-17 13:56:48 +00:00
<?php
2018-11-21 06:29:18 +00:00
Route::group(['namespace' => 'Webkul\API\Http\Controllers\Customer', 'prefix' => 'api/customer'], function ($router) {
//auth route for customer
Route::post('login', 'AuthController@create');
//get user
Route::get('get/user', 'CustomerController@getProfile');
//wishlist
Route::get('get/wishlist', 'WishlistController@getWishlist');
//address
Route::get('get/address', 'AddressController@getAddress');
Route::get('get/default/address', 'AddressController@getDefaultAddress');
2018-11-17 13:56:48 +00:00
});
2018-11-21 06:29:18 +00:00
Route::group(['namespace' => 'Webkul\API\Http\Controllers\Shop', 'prefix' => 'api/cart'], function ($router) {
//cart
//active + inactive instances of cart for the current logged in user
Route::get('get/all', 'CartController@getAllCart');
//active instances of cart for the current logged in user
Route::get('get/active', 'CartController@getActiveCart');
//inactive instances of cart for the current logged in user
Route::get('get/inactive', 'CartController@getInactiveCart');
});
Route::group(['namespace' => 'Webkul\API\Http\Controllers\Product', 'prefix' => 'api/product'], function ($router) {
//product
//to fetch the new product
Route::get('get/all', 'ProductController@getAllProducts');
});
Route::group(['namespace' => 'Webkul\API\Http\Controllers\Admin', 'prefix' => 'api/admin'], function ($router) {
});