TaskA/routes/web.php

73 lines
2.3 KiB
PHP
Raw Permalink Normal View History

2024-06-16 08:11:32 +00:00
<?php
use App\Http\Controllers\ProfileController;
use App\Http\Controllers\MailController;
2024-06-18 09:43:01 +00:00
use App\Http\Controllers\LangController;
2024-06-16 08:11:32 +00:00
use App\Http\Controllers\backend\UserController;
use Illuminate\Support\Facades\Route;
use Illuminate\Support\Facades\Mail;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Session;
use App\Http\Controllers\LocaleController;
Route::get('/', function () {
return view('welcome');
});
Route::get('/dashboard', function () {
return view('dashboard');
})->middleware(['auth', 'verified'])->name('dashboard');
Route::middleware('auth')->group(function () {
Route::get('/profile', [ProfileController::class, 'edit'])->name('profile.edit');
Route::patch('/profile', [ProfileController::class, 'update'])->name('profile.update');
Route::delete('/profile', [ProfileController::class, 'destroy'])->name('profile.destroy');
});
require __DIR__ . '/auth.php';
Auth::routes();
Route::get('/home', [App\Http\Controllers\HomeController::class, 'index'])->name('home');
//DataTables
Route::get('/datatables', function () {
return view('backend.datatables');
});
//Email
//Route::post('/send-email', [MailController::class, 'sendEmail']);
Route::post('/send-email', [UserController::class, 'StoreUser'])->name('send-email');
Route::get('/all-user', [App\Http\Controllers\backend\UserController::class, 'AllUser'])->name('alluser');
Route::get('/add-user', [App\Http\Controllers\backend\UserController::class, 'AddUser'])->name('adduser');
Route::post('/store-user', [App\Http\Controllers\backend\UserController::class, 'StoreUser'])->name('storeuser');
Route::get('/edit-user/{id}', [App\Http\Controllers\backend\UserController::class, 'EditUser'])->name('edituser');
Route::post('/update-user/{id}', [App\Http\Controllers\backend\UserController::class, 'UpdateUser'])->name('updateuser');
Route::delete('/delete-user/{id}', [App\Http\Controllers\backend\UserController::class, 'DeleteUser'])->name('deleteuser');
Route::get('/send-email-form', [App\Http\Controllers\backend\UserController::class, 'ShowEmailForm'])->name('show-email-form');
Route::post('/send-email', [App\Http\Controllers\backend\UserController::class, 'SendEmail'])->name('send-email');
// Route for setting the locale
2024-06-18 09:43:01 +00:00
Route::get('/lang/change', [App\Http\Controllers\LangController::class, 'change'])->name('changelang');