<?php

use App\Http\Controllers\Backend\CompanyController;
use App\Http\Controllers\Backend\Component\ComponentController;
use App\Http\Controllers\Backend\Faq\FaqController;
use App\Http\Controllers\Backend\Pages\PagesController;
use App\Http\Controllers\Backend\Services\ServiceController;
use App\Http\Controllers\Backend\Slider\SliderController;
use App\Http\Controllers\Backend\Theme\ThemeController;
use App\Http\Controllers\Backend\Widget\WidgetController;
use Illuminate\Support\Facades\Route;



Route::prefix('admin')->middleware('auth')->group(function () {
    Route::resource('slider', SliderController::class);
    Route::resource('service', ServiceController::class);
    Route::resource('faq', FaqController::class);
    Route::resource('component', ComponentController::class);
    Route::post('delete-field', [ComponentController::class, 'fieldDelete'])->name('delete-field');
    Route::resource('pages', PagesController::class);
    Route::post('add-ui', [PagesController::class, 'addui'])->name('add-ui');
    Route::resource('company', CompanyController::class);
    Route::resource('widget', WidgetController::class);
    Route::resource('theme-option', ThemeController::class);
    Route::post('theme-option-contact', [ThemeController::class, 'contact'])->name('theme-option.contact');
    Route::post('theme-option-logo', [ThemeController::class, 'logo'])->name('theme-option.logo');
    Route::post('theme-option-social', [ThemeController::class, 'social'])->name('theme-option.social');
});
Route::group(['prefix' => 'laravel-filemanager', 'middleware' => ['web', 'auth']], function () {
    \UniSharp\LaravelFilemanager\Lfm::routes();
});