<?php

use Illuminate\Support\Facades\Route;

/*
|--------------------------------------------------------------------------
| 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('/pulse', function () {
    return view('wel');
});

Route::get('/hris_pulse', function () {
    return view('vendor.pulse.dashboard');
});

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

Route::get('/test-email', function () {
    try {
        \Mail::raw('Hello from Laravel + Docker + MailHog!', function ($message) {
            $message->to('test@example.com')
                    ->subject('Test Email from Laravel');
        });
        
        return 'Email sent successfully! Check MailHog at <a href="http://localhost:8025" target="_blank">http://localhost:8025</a>';
    } catch (Exception $e) {
        return 'Error sending email: ' . $e->getMessage();
    }
});