<?php

use Illuminate\Support\Facades\Route;
use App\Http\Controllers\Website\HomeController;
use App\Http\Controllers\Website\SpeciesController;
use App\Http\Controllers\Website\ProductsController;

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/


    Route::get('/', [HomeController::class, 'index'])->name('home');
    Route::get('/contact', [HomeController::class, 'contact'])->name('contact');
    Route::post('/contact', [HomeController::class, 'contactMessage'])->name('contact.send');
    Route::get('/page/{page}', [HomeController::class, 'page'])->name('page');

    Route::prefix('spesies')->group(function () {
        Route::get('/{species}', [SpeciesController::class, 'species'])->name('species_details');
        Route::get('/fish/{fish}', [SpeciesController::class, 'fish'])->name('fish_details');
    });

    Route::prefix('products')->group(function () {
        //Route::get('/', [ProductsController::class, 'products'])->name('products_details');
        Route::get('/{product}', [ProductsController::class, 'product'])->name('product_details');
    });

