<?php

use Illuminate\Support\Facades\Route;
use TPS\Shop\Http\Controllers\Home;
use TPS\Shop\Http\Controllers\ReviewController;
use TPS\Shop\Http\Controllers\ShopController;
use TPS\Shop\Http\Controllers\WebsiteReviewController;

Route::group(['middleware' => ['web', 'locale', 'theme', 'currency']], function () {

    /**
     * Store front home.
     */
    Route::get('/', [Home::class, 'index'])->defaults('_config', [
        'view' => 'shop::home.index',
    ])->name('shop.home.index');

    Route::get('/search',  [ShopController::class, 'search'])->name('shop.search.index');

    Route::get('/product_reviews/{product_id}',[ReviewController::class,'index'])->name('shop.product.reviews.index');
    Route::post('/product_reviews/{product_id}',[ReviewController::class,'store'])->name('shop.product.reviews.store');

    Route::get('/website_reviews',[WebsiteReviewController::class,'index'])->name('shop.website_reviews.index'); 
    Route::post('/website_reviews',[WebsiteReviewController::class,'store'])->name('shop.website_reviews.store');

});
