<?php

use Illuminate\Support\Facades\Route;
use App\Http\Controllers\LoginController;

/*
|--------------------------------------------------------------------------
| صفحة الدخول الموحدة — تحدد الدور تلقائياً
|--------------------------------------------------------------------------
*/
Route::get('/',       [LoginController::class, 'showLogin'])->name('login');
Route::get('/login',  [LoginController::class, 'showLogin']);
Route::post('/login', [LoginController::class, 'login'])->name('login.post');
Route::post('/logout',[LoginController::class, 'logout'])->name('logout');

require __DIR__.'/admin.php';
require __DIR__.'/secretary.php';
require __DIR__.'/doctor.php';
require __DIR__.'/patient.php';
