MOON
Server: Apache
System: Linux ip-208-109-13-31.ip.secureserver.net 3.10.0-1160.119.1.el7.tuxcare.els4.x86_64 #1 SMP Sat Aug 31 06:58:57 UTC 2024 x86_64
User: durgeshpandey215 (1013)
PHP: 8.1.29
Disabled: NONE
Upload Files
File: /home/durgeshpandey215/public_html/almadina.skilladders.com/routes/web.php
<?php

use Illuminate\Support\Facades\Route;
use App\Http\Controllers\HomeController;
use App\Http\Controllers\AuthController;
use App\Http\Controllers\ProductController;
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider and all of them will
| be assigned to the "web" middleware group. Make something great!
|
*/

// Route::get('/', function () {
//     return view('welcome');
// });
Route::get('/',[HomeController::class,'index']);
Route::get('/about',[HomeController::class,'about']);
Route::get('/contact',[HomeController::class,'contact']);
Route::get('/plp',[HomeController::class,'plp']);
Route::get('/pdp/{id}',[HomeController::class,'pdp']);
Route::get('/privacy',[HomeController::class,'privacy']);
Route::get('/terms',[HomeController::class,'terms']);
Route::post('/savecontact', [HomeController::class, 'savecontact']);
Route::get('/p/{shortCode}', [HomeController::class, 'handleShortUrl'])->name('product.short');


Route::get('/login', [AuthController::class, 'show'])->name('login');
Route::post('/login', [AuthController::class, 'login']);

Route::middleware('auth')->group(function () {
    Route::get('/dashboard', [ProductController::class, 'dashboard'])->name('dashboard');
    Route::get('/newproduct', [ProductController::class, 'create'])->name('newproduct');
    Route::get('/editproduct/{id}', [ProductController::class, 'edit'])->name('newproduct');
    Route::delete('/products/{id}', [ProductController::class, 'delete'])->name('products');

    Route::post('/saveproduct', [ProductController::class, 'store'])->name('saveproduct');
    Route::post('/logout', [AuthController::class, 'logout'])->name('logout');
});