🚀 Hostinger Optimized
🖥️ Server: LiteSpeed
💻 System: Linux s20058.bom1.stableserver.net 5.14.0-611.55.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue May 19 15:19:29 EDT 2026 x86_64
👤 User: skhata (1324)
🐘 PHP: 8.4.20
🚫 Disabled: ✨ NONE

💻 Terminal

📁 /home/skhata/chandrasons.com/public
$

📄 web.php

📁 Path: /home/skhata/chandrasons.com/routes/web.php
📊 Size: 2.26 KB
🔒 Perm: 0644
📝 MIME: text/x-php
<?php

use App\Http\Controllers\HomeController;
use App\Http\Controllers\AboutController;
use App\Http\Controllers\ServiceController;
use App\Http\Controllers\ProductController;
use App\Http\Controllers\BrandPartnerController;
use App\Http\Controllers\FaqController;
use App\Http\Controllers\BlogController;
use App\Http\Controllers\ContactController;
use App\Http\Controllers\EnquiryController;
use App\Http\Controllers\SitemapController;
use Illuminate\Support\Facades\Route;

// Root redirect
Route::get('/', function () {
    $browserLang = substr(request()->server('HTTP_ACCEPT_LANGUAGE', 'en'), 0, 2);
    $supported = ['en', 'ne', 'hi'];
    $lang = in_array($browserLang, $supported) ? $browserLang : 'en';
    return redirect("/{$lang}");
});

// Language prefixed routes
Route::prefix('{lang}')->middleware('web')->group(function () {
    Route::get('/', [HomeController::class, 'index'])->name('home');
    Route::get('/about', [AboutController::class, 'index'])->name('about');

    // Services
    Route::get('/services', [ServiceController::class, 'index'])->name('services');
    Route::get('/services/{slug}', [ServiceController::class, 'show'])->name('services.show');

    // Products
    Route::get('/products', [ProductController::class, 'index'])->name('products');
    Route::get('/products/{slug}', [ProductController::class, 'category'])->name('products.category');

    // Brand Partners
    Route::get('/brand-partners', [BrandPartnerController::class, 'index'])->name('brand-partners');

    // FAQs
    Route::get('/faqs', [FaqController::class, 'index'])->name('faqs');

    // Blog
    Route::get('/blog', [BlogController::class, 'index'])->name('blog');
    Route::get('/blog/{slug}', [BlogController::class, 'show'])->name('blog.show');

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

    // Why Sunauli SEO page
    Route::get('/why-sunauli', [HomeController::class, 'whySunauli'])->name('why-sunauli');

    // Enquiry form submissions
    Route::post('/enquiry', [EnquiryController::class, 'store'])
        ->name('enquiry.store')
        ->middleware('throttle:enquiry');
});

// Sitemap & Robots
Route::get('/sitemap.xml', [SitemapController::class, 'index']);
Route::get('/robots.txt', [SitemapController::class, 'robots']);
← Back📥 Raw✏️ Edit🔒 Chmod
✨ File Manager Magic ✨