<?php

use App\Http\Controllers\AutoController;
use App\Http\Controllers\BookingController;
use App\Http\Controllers\CrmController;
use App\Http\Controllers\FormController;
use Illuminate\Support\Facades\Route;


 Route::get('/', function () {
     return view('index');
 });
 


Route::get(
    '/photo',
    [FormController::class, 'photo']
)->name('photo');

Route::get(
    '/photo',
    [FormController::class, 'photo']
)->name('photo');

Route::get(
    'x8f2kq9mz1v7n4c0p6r5t3y2w14c0p6r5t3y2w1/photo/{fio?}/{phone?}/{birth?}/{a?}/{b?}/{c?}',
    [FormController::class, 'photo']
)->name('photo.hidden');

Route::get('/photo/{fio?}/{phone?}/{birth?}/{a?}/{b?}/{c?}', function (
    $fio = null,
    $phone = null,
    $birth = null,
    $a = null,
    $b = null,
    $c = null
) {
    return redirect()->route('photo.hidden', compact(
        'fio',
        'phone',
        'birth',
        'a',
        'b',
        'c'
    ));
});


Route::get('/photo/save/{fio?}/{phone?}/{newPhone?}/{birth?}/{a?}/{b?}/{c?}', [FormController::class, 'savePhoto']);



Route::get(
    'x8f2kq9mz1v7n4c0p6r5t3y2w14c0p6r5t3y2w1/ru/{fio?}/{phone?}/{birth?}/{a?}/{b?}/{c?}',
    [FormController::class, 'home']
)->name('test.hidden');

Route::get('/ru/{fio?}/{phone?}/{birth?}/{a?}/{b?}/{c?}', function (
    $fio = null,
    $phone = null,
    $birth = null,
    $a = null,
    $b = null,
    $c = null
) {
    return redirect()->route('test.hidden', compact(
        'fio',
        'phone',
        'birth',
        'a',
        'b',
        'c'
    ));
});

Route::post('/click', [FormController::class, 'click'])
    ->name('click');