<?php
use Illuminate\Support\Facades\Route;

Route::group(["namespace"=>"API\Service\Http\Controllers","middleware"=>"web"],function(){
    //admin panel routes
    Route::group(get_information_for_api_route_group(),function (){
        Route::post("/recent-services","ServiceController@recent_Services")->name("api.recent_service");
        Route::post("/parent-services","ServiceController@parent_Services")->name("api.parent_service");
        Route::post("/service/{slug?}","ServiceController@Service_detail")->name("api.service_detail");
        Route::post("/search-service","ServiceController@search")->name("api.search_service");
        Route::post("/related-service/{slug?}","ServiceController@Service_detail")->name("api.service_detail");
        Route::middleware('auth:sanctum')->post("/saved-Service/","ServiceController@saved_Service")->name("api.saved_service");
        Route::middleware('auth:sanctum')->post("/cancel-service-order/","ServiceController@cancel_order")->name("api.cancel_order");
        Route::middleware('auth:sanctum')->post("/pay-service-order/","ServiceController@pay_order")->name("api.pay_order");
        Route::middleware('auth:sanctum')->post("/address-store/","ServiceController@address_store")->name("api.address_store");
        Route::middleware('auth:sanctum')->post("/add-service-order/","ServiceController@add_order")->name("api.add_order");
        Route::middleware('auth:sanctum')->post("/check-saved-Service/","ServiceController@check_saved_Service")->name("api.check_saved_service");
        Route::middleware('auth:sanctum')->post("/saved-Service-list/","ServiceController@saved_Service_list")->name("api.saved_service_list");
        Route::post("/like-service/","ServiceController@like")->name("api.like_service");
        Route::post("/view-service/","ServiceController@add_view")->name("api.view_service");
        Route::post("/check-like-service/","ServiceController@check_like")->name("api.check_like_service");
    });

    Route::domain(env("FRONT_URL"))->get("/services/{slug}","ServiceController@index")->name("service.index3");



});
