<?php


use Illuminate\Support\Facades\Route;

Route::group(
    [
        "namespace"=>"Mamad\Group_Product\Http\Controllers",
        "middleware"=>"web"
    ],function (){

//admin panel routes
Route::group(get_information_for_admin_panel_route_group(),function (){
    Route::get("/children-group-product","GroupChildrenProductController@product_list")->name("children_group_product.list");
    Route::post("/ajax-update-products","GroupChildrenProductController@ajax_update_products")->name("ajax_update_products");
    Route::get("/children-group-product/add","GroupChildrenProductController@product_add_form")->name("children_group_product.add");
    Route::post("/children-group-product/add","GroupChildrenProductController@product_add")->name("children_group_product.add");
    Route::post("/children-group-product/edit/{id}","GroupChildrenProductController@product_edit")->name("children_group_product.edit");
    Route::get("/children-group-product/edit/{id}","GroupChildrenProductController@product_edit_form")->name("children_group_product.edit");
    Route::delete("/children-group-product/delete/{id}","GroupChildrenProductController@product_delete")->name("children_group_product.delete");

    Route::get("/group-product","GroupProductController@product_list")->name("group_product.list");
    Route::get("/group-product/add","GroupProductController@product_add_form")->name("group_product.add");
    Route::post("/group-product/add","GroupProductController@product_add")->name("group_product.add");
    Route::post("/group-product/edit/{id}","GroupProductController@product_edit")->name("group_product.edit");
    Route::get("/group-product/edit/{id}","GroupProductController@product_edit_form")->name("group_product.edit");
    Route::delete("/group-product/delete/{id}","GroupProductController@product_delete")->name("group_product.delete");
});


//front routes

});
