?php use Illuminate\Http\Request; use App\Http\Controllers\API\Product\CartController; use App\Http\Controllers\API\Auth\LoginApiController; use App\Http\Controllers\API\Recipe\RecipeController; use App\Http\Controllers\API\Review\ReviewController; use App\Http\Controllers\API\Order\OrderListController; use App\Http\Controllers\API\Product\ProductController; use App\Http\Controllers\API\Product\CheckoutController; use App\Http\Controllers\API\Auth\ResetPasswordController; use App\Http\Controllers\API\Auth\ForgotPasswordController; use App\Http\Controllers\API\Lifestyle\LifestyleController; use App\Http\Controllers\API\Ingredient\IngredientController; use App\Http\Controllers\API\Appsettings\AppSettingsController; use App\Http\Controllers\API\Auth\MobileVerificationController; use App\Http\Controllers\API\UserProfile\UserProfileController; use App\Http\Controllers\API\UserProfile\UserProductReviewController; use App\Http\Controllers\API\Article\MyArticleController; use App\Http\Controllers\API\Foodsettings\FoodsettingController; use App\Http\Controllers\API\Collection\CollectionController; /* |-------------------------------------------------------------------------- | API Routes |-------------------------------------------------------------------------- | | Here is where you can register API routes for your application. These | routes are loaded by the RouteServiceProvider within a group which | is assigned the "api" middleware group. Enjoy building your API! | */ Route::middleware('auth:api')->get('/user', function (Request $request) { return $request->user(); }); // for testing Route::get('userapidata' , function(){ if(auth('api')->user()){ return response()->json(['user_status'=>true, 'user_data'=>auth('api')->user()]); }else{ return response()->json(['user_status'=>false, 'user_data'=>null]); } return auth('api')->user(); }); // new api by #ashish Route::post('loginotp', 'API\Auth\LoginApiController@loginotp'); Route::get('logout', 'API\Auth\LoginApiController@logout'); Route::post('login', 'API\Auth\LoginApiController@login'); // user login api //Api Mobile Application Route::post('/send-otp', 'API\Auth\MobileVerificationController@sendOTP'); Route::post('/verify-otp', 'API\Auth\MobileVerificationController@verifyOTP'); Route::post('/resend-otp', 'API\Auth\MobileVerificationController@sendOTP'); Route::group(['middleware' => ['jwt.auth']], function() { Route::get('logout', 'API\Auth\LoginApiController@logout'); Route::get('test', function(){ $userdata = Auth::user(); // return user object return response()->json(['foo'=>'bar', 'user_id'=>$userdata]); }); }); Route::get('someMethod','API\UserProfile\UserProfileController@someMethod'); /*------------------User Profile Section Start ----------------*/ Route::get('user-dashboard', 'API\UserProfile\UserProfileController@user_dashboard'); Route::get('user-profile-setting', 'API\UserProfile\UserProfileController@user_profile_setting'); Route::post('user-update-personal-info', 'API\UserProfile\UserProfileController@user_update_personal_info'); Route::get('city-list', 'API\UserProfile\UserProfileController@city_list'); Route::post('post-city-list', 'API\UserProfile\UserProfileController@post_city_list'); Route::get('get-state-list', 'API\UserProfile\UserProfileController@state_list'); Route::post('update-user-password', 'API\UserProfile\UserProfileController@update_user_password'); Route::get('user-wish-list', 'API\UserProfile\UserProfileController@user_wish_list'); Route::post('my-wishlist-update', 'API\UserProfile\UserProfileController@my_wishlist_update'); Route::get('profile-dashboard', 'API\UserProfile\UserProfileController@profile_dashboard'); //product list by subcategory Route::get('getSubcatProduct/{slug?}/{sub_limit?}/{pageno?}','API\Product\ProductController@getSubcatProduct'); Route::get('getSubcatProductlist/{cat_id?}','API\Product\ProductController@getSubcatProductlist'); // get like product list // Route::get('get-user-like-products','API\Product\ProductController@getUserLikeProducts'); //get data for all category Route::get('getAllProducts', 'API\Product\ProductController@getProductSubcategory'); // get data for subcategory Route::get('getAllSubCategory', 'API\Product\ProductController@getAllSubCategory'); //get category subctegory list Route::get('subcategorylist/{slug?}', 'API\Product\ProductController@subCategorylist'); //product detail Route::get('productdetails_json/{slug?}', 'API\Product\ProductController@productdetails_json'); //on behalf of category show products Route::get('productlist_json/{slug}', 'API\Product\ProductController@productlist_json'); Route::post('product-search-suggestion', 'API\Product\ProductController@product_search_suggestion'); // notify me product Route::post('notify-me', 'API\Product\ProductController@notify_me'); //get all user recipes Route::get('getAllRecipes', 'API\Recipe\RecipeController@getAllRecipes'); Route::get('getRecipeDetail/{slug}', 'API\Recipe\RecipeController@getRecipeDetail'); Route::get('myRecipes', 'API\Recipe\RecipeController@myRecipes'); // only for auth user Route::post('saveRecipeFirstStep', 'API\Recipe\RecipeController@saveRecipeFirstStep'); // first step Route::post('saveRecipeSecondStep', 'API\Recipe\RecipeController@saveRecipeSecondStep'); // second step Route::post('saveRecipeThirdStep', 'API\Recipe\RecipeController@saveRecipeThirdStep'); // second step Route::post('saveRecipeLastStep', 'API\Recipe\RecipeController@saveRecipeLastStep'); // second step Route::get('testhtml', 'API\Recipe\RecipeController@testhtml'); // second step // technique Route::get('getRecipesDietsCusineOccasionCourseData', 'API\Recipe\RecipeController@getRecipesDietsCusineOccasionCourseData'); Route::get('getRecipesTypeFoodTypeData', 'API\Recipe\RecipeController@getRecipesTypeFoodTypeData'); Route::post('recipes-technique-search', 'API\Recipe\RecipeController@recipes_technique_search'); //get list of receipe like recentadd, popular etc. Route::get('recipeslanding_json', 'API\Recipe\RecipeController@recipeslanding_json'); Route::get('category-list', 'API\Product\ProductController@categories'); //on behalf of category show products Route::get('getcatProducts/{cat_id?}/{limit?}/{page_no?}', 'API\Product\ProductController@getcatProducts'); //exclusive product Route::get('getExclusiveProducts/{limit?}/{page_no?}', 'API\Product\ProductController@getExclusiveProducts'); //get all exclusive product without limit Route::get('getAllExclusiveProducts', 'API\Product\ProductController@getAllExclusiveProducts'); //trending product Route::get('getTrendingProducts/{limit?}/{page_no?}', 'API\Product\ProductController@getTrendingProducts'); //get all Trending product without limit Route::get('getAllTrendingProducts', 'API\Product\ProductController@getAllTrendingProducts'); //user add product Route::post(' ', 'API\Product\ProductController@user_add_product'); Route::get('/header-logo', 'API\Appsettings\AppSettingsController@header_logo'); Route::post('forgot-password','API\Auth\ForgotPasswordController@forgot_password'); Route::post('/reset-password/{token}', 'API\Auth\ResetPasswordController@reset')->name('password.reset'); Route::get('food_category_recipe/{id?}', 'API\Recipe\RecipeController@food_category_recipe'); Route::get('food_category', 'API\Recipe\RecipeController@food_category'); Route::get('saved-recipes', 'API\Recipe\RecipeController@saved_recipes'); Route::get('saved-recipes-delete/{id?}', 'API\Recipe\RecipeController@saved_recipes_delete'); Route::get('fav-recipes-delete/{id?}', 'API\Recipe\RecipeController@fav_recipes_delete'); Route::get('cooked-recipes-delete/{id?}', 'API\Recipe\RecipeController@cooked_recipes_delete'); /** add to cart */ // Route::post('/add-to-cart', 'API\AddtoCart\CartController@addToCart'); Route::post('/add-to-cart', 'API\Product\CartController@addToCart'); Route::post('/remove-cart-item', 'API\Product\CartController@removeCartItem'); Route::get('/cart-list/{uni_code?}', 'API\Product\CartController@cartList'); // checkout and payment setup in payment gateway Route::post('/checkout', 'API\Product\CheckoutController@checkout'); Route::post('/payment-capture', 'API\Product\CheckoutController@paymentCapture'); //order list Route::get('order-list', 'API\Order\OrderListController@checkoutList'); //order details Route::get('order-details/{order_id?}', 'API\Order\OrderListController@order_details'); /** *************************Review controller apis ************************** */ /** onbehalf of product detail review form */ Route::get('productdetail-reviewform/{slug}', 'API\Review\ReviewController@productdetail_reviewform'); Route::post('/product-wishlist', 'API\UserProfile\UserLikeItemsController@prodReceipeLike'); Route::post('/product-bookmark', 'API\UserProfile\UserLikeItemsController@prodReceipeSave'); Route::get('/product-saveforlater-list', 'API\UserProfile\UserLikeItemsController@saveForLatterProductList'); Route::get('/get-product-bookmark', 'API\UserProfile\UserLikeItemsController@saveForLatterProductList'); Route::get('/get-product-wishlist', 'API\UserProfile\UserLikeItemsController@getUserLikeProductsList'); // user address Route::get('/get-user-address-list', 'API\UserProfile\UserProfileController@UserAddressList'); Route::get('/user-address-delete/{address_id}', 'API\UserProfile\UserProfileController@UserAddressDelete'); Route::post('/post-user-address', 'API\UserProfile\UserProfileController@postUserAddress'); Route::post('/delete-user-address', 'API\UserProfile\UserProfileController@deleteUserAddress'); Route::get('address-type-list', 'API\UserProfile\UserProfileController@addressTypeList'); // Nutribudy profile Route::get('/getNutribuddy', 'API\UserProfile\nutribuddyProfileController@index'); Route::post('/postStepFirst', 'API\UserProfile\nutribuddyProfileController@stepFirst'); Route::post('/postStepSecond', 'API\UserProfile\nutribuddyProfileController@stepSecond'); Route::post('/postStepThird', 'API\UserProfile\nutribuddyProfileController@stepThird'); Route::post('/postStepFourth', 'API\UserProfile\nutribuddyProfileController@stepFourth'); Route::post('nutribuddy-food-delete','API\UserProfile\nutribuddyProfileController@delete_nutribuddy_food'); Route::post('nutribuddy-allergy-delete','API\UserProfile\nutribuddyProfileController@delete_nutribuddy_allergy'); // user product review Route::post('/post-user-product-review', 'API\UserProfile\UserProductReviewController@postProductReview'); //add ingredient by user Route::get('category-ingredient','API\Ingredient\IngredientController@get_category_ingredient'); Route::post('ingredient-add','API\Ingredient\IngredientController@ingredient_add'); Route::get('ingredients_details/{slug?}', 'API\Ingredient\IngredientController@ingredients_details'); // Route::get('ingredients-list', 'API\Ingredient\IngredientController@ingredients_list'); Route::get('ingredients-list/{limit?}/{pageno?}','API\Ingredient\IngredientController@ingredients_list'); // Route::get('cuisineapi-ingredients', 'API\Ingredient\IngredientController@cuisineapi_ingredients'); Route::get('ingredient-get-filter', 'API\Ingredient\IngredientController@ingredient_get_filter'); Route::post('new-ingredient-post-response', 'API\Ingredient\IngredientController@new_ingredient_filter_response'); Route::post('/getIngredients', 'API\Ingredient\IngredientController@getIngredients')->name('getIngredients'); Route::post('ingredient-post-response', 'API\Ingredient\IngredientController@ingredient_filter_response'); //user lifestyle setting Route::get('lifestyle-setting', 'API\Lifestyle\LifestyleController@lifestyle_setting'); Route::post('lifestyle-setting-post', 'API\Lifestyle\LifestyleController@lifestyle_setting_post'); //my article Route::get('my-articles', 'API\Article\MyArticleController@my_articles'); Route::get('submit-article-get', 'API\Article\MyArticleController@submit_article_get'); Route::get('submit-article-edit/{id?}', 'API\Article\MyArticleController@submit_article_edit'); Route::post('update-article', 'API\Article\MyArticleController@update_article'); Route::post('submit-article-post', 'API\Article\MyArticleController@submit_article_post'); Route::post('delete-article', 'API\Article\MyArticleController@delete_article'); Route::get('articledetails_json/{slug?}', 'API\Article\MyArticleController@articledetails_json'); Route::get('articleListApi/{limit?}/{pageno?}', 'API\Article\MyArticleController@articleListApi'); //food setting Route::get('user-food-setting', 'API\Foodsettings\FoodsettingController@user_food_setting'); Route::post('save-food-setting', 'API\Foodsettings\FoodsettingController@save_food_setting'); Route::get('delete-fav-ingredient/{id?}', 'API\Foodsettings\FoodsettingController@delete_fav_ingredient'); Route::get('delete-neg-ingredient/{id?}', 'API\Foodsettings\FoodsettingController@delete_neg_ingredient'); //--------------------------------------------Collection controller------------------------------------------ Route::get('badges-collection', 'API\Collection\CollectionController@badges_collection'); Route::get('my-collections', 'API\Collection\CollectionController@my_collections'); Route::get('delete-collection/{id?}', 'API\Collection\CollectionController@delete_collection'); Route::get('leaderboard-ranking', 'API\Collection\CollectionController@leaderboard_ranking'); // Route::get('leaderboard-ranks', 'API\Collection\CollectionController@leaderboard_ranks'); /*********************** * old api routes ***********************/ // Route::get('getSubcatProduct/{slug?}/{sub_limit?}/{pageno?}','ApiController@getSubcatProduct'); // Route::get('getAllProducts', 'ApiController@getProductSubcategory'); // Route::get('getProductSubcategory', 'ApiController@getProductSubcategory'); // Route::get('getAllSubCategory', 'ApiController@getAllSubCategory'); Route::get('getAllProductFilter', 'ApiController@getAllProductFilter'); // Route::get('subcategorylist/{slug?}', 'ApiController@subCategorylist'); Route::get('cuisineapi', 'ApiController@cuisineapi'); Route::get('ingredientcategoryapi', 'ApiController@ingredientcategoryapi'); // Route::get('getAllRecipes', 'ApiController@getAllRecipes'); Route::post('inmykitchen_post', 'ApiController@inmykitchen_post'); Route::get('tags', 'ApiController@tags'); // Route::get('productdetail-reviewform/{slug}', 'ApiController@productdetail_reviewform'); Route::post('post-contact-us', 'ApiController@post_contact_us'); Route::post('post-feedback', 'ApiController@post_feedback'); Route::get('blog-category-json', 'ApiController@blog_category_json'); Route::get('blog-list-json', 'ApiController@blog_list_json'); Route::get('blog-details-json/{slug}', 'ApiController@blog_details_json'); Route::get('recipes-filter', 'ApiController@recipes_filter'); Route::get('ingredients-filter', 'ApiController@ingredients_filter'); Route::post('request-userlogin-access', 'ApiController@request_userlogin_access'); Route::post('check-existing-id', 'ApiController@check_existing_emailid'); Route::post('user-post-food-setting', 'ApiController@user_post_food_setting'); Route::post('user-lifestyle-setting-post', 'ApiController@user_lifestyle_setting_poste'); // Route::post('update-user-password', 'ApiController@update_user_password'); // Route::post('user-update-personal-info', 'ApiController@user_update_personal_info'); Route::post('user-reply-comment', 'ApiController@user_reply_comment'); Route::post('review-result-data', 'ApiController@review_result_data'); Route::post('sacn-data', 'ApiController@scan_data'); Route::post('recipes-post-comments', 'ApiController@recipes_post_comments'); Route::get('leaderboard-rank', 'ApiController@leaderboard_rank'); Route::get('user-badges', 'ApiController@user_badges'); Route::post('review-like', 'ApiController@review_like'); Route::post('report-an-issue', 'ApiController@report_an_issue'); Route::get('edit-review/{page}/{page_id}/{id}', 'ApiController@editReview'); Route::post('edit-review-post', 'ApiController@postEditReview'); Route::get('ingredient-category','ApiController@get_ingredient_category'); Route::post('add-ingredient','ApiController@add_ingredient'); Route::get('delete-my-review/{id}', 'ApiController@delete_my_review'); Route::get('user-public-profile/{id}', 'ApiController@user_public_profile'); Route::post('ingredient-imk-api', 'ApiController@ingredient_imk_api'); Route::post('post-follow', 'ApiController@post_follow'); Route::post('update-recipes-review', 'ApiController@update_recipes_review'); Route::get('network', 'ApiController@network'); Route::get('my-contribution', 'ApiController@my_contribution'); Route::get('delete-review/{id}', 'ApiController@delete_review'); Route::post('my-shopping', 'ApiController@my_shopping'); Route::post('my-wishlist', 'ApiController@my_wishlist'); Route::post('comingsoon-request', 'ApiController@comingsoon_request'); Route::get('delete-imk/{id}/{model}', 'ApiController@delete_imk'); // Route::get('city-list', 'ApiController@city_list'); Route::post('add-search-item', 'ApiController@add_search_item');