<?php

use App\Http\Controllers\ArticleController;
use App\Http\Controllers\ContactController;
use App\Http\Controllers\HomeController;
use App\Http\Controllers\ReferController;
use App\Http\Controllers\ServiceController;
use Illuminate\Support\Facades\Route;

/*
|--------------------------------------------------------------------------
| 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('/about', [HomeController::class, 'about'])->name('about');

Route::get('services/{view?}', [ServiceController::class, 'serviceView'])->name('services');
Route::post('/services', [ServiceController::class, 'store'])->name('services.store');

Route::get('/testimonials', [HomeController::class, 'testimonials'])->name('testimonials');

Route::get('/refer-offer', [ReferController::class, 'index'])->name('refer-offer');
Route::post('/refer-offer', [ReferController::class, 'store'])->name('refer-offer.store');

Route::get('/contact', [ContactController::class, 'index'])->name('contact');
Route::post('/contact', [ContactController::class, 'store'])->name('contact.store');

Route::resource('articles', ArticleController::class)->only(['index', 'show']);
