<?php

use Illuminate\Support\Facades\Route;
use App\Http\Controllers\DashboardController;
use App\Http\Controllers\MyprofileController;
use App\Http\Controllers\MypostadController;
use App\Http\Controllers\AboutController;
use App\Http\Controllers\ServiceController;
use App\Http\Controllers\PricingController;
use App\Http\Controllers\MyhomeController;

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

// Route::get('/page1', function () {
//     return view('layouts.frontend');
// });
Route::get('/', [MyhomeController::class, 'index'])->name('index');







Route::get('/{id}/product-details', [MyhomeController::class, 'productdetails'])->name('home4');

Route::get('/category', [MypostadController::class, 'category'])->name('category');
Route::get('/category-list', [MypostadController::class, 'categorylist'])->name('category-list');

Route::get('/about', [AboutController::class, 'index'])->name('about');
Route::get('/service', [ServiceController::class, 'index'])->name('service');
Route::get('/pricing', [PricingController::class, 'index'])->name('pricing');
//Route::get('/home', [App\Http\Controllers\HomeController::class, 'index'])->name('home');


Auth::routes();

Route::get('/home', [App\Http\Controllers\HomeController::class, 'index'])->name('home');
Route::get('/dashboard', [DashboardController::class, 'index'])->name('dashboard');
Route::get('/profile-settings', [MyprofileController::class, 'index'])->name('profile-settings');
Route::post('/get-subcategories', [MypostadController::class, 'getSubcategories'])->name('get.subcategories');
Route::get('/post-ad', [MypostadController::class, 'index'])->name('post-ad');
Route::post('/post-ad', [MypostadController::class, 'addpost'])->name('addpost');

Route::get('/my-ads', [MypostadController::class, 'myads'])->name('my-ads');
Route::post('/postdel', [MypostadController::class, 'postdel'])->name('ads.del');
Route::post('/postedit', [MypostadController::class, 'postedit'])->name('ads.edit');
Route::post('/postupdate', [MypostadController::class, 'postupdate'])->name('ads.update');
//Route::get('/my-ads', [MypostadController::class, 'myads'])->name('my-ads');
Route::get('/offers', [MypostadController::class, 'offers'])->name('offers');
Route::get('/payments', [MypostadController::class, 'payments'])->name('payments');
Route::get('/favorites', [MypostadController::class, 'favorites'])->name('favorites');
Route::get('/privacy', [MypostadController::class, 'privacy'])->name('privacy');
