73 lines
2.3 KiB
PHP
73 lines
2.3 KiB
PHP
<?php
|
|
|
|
use App\Http\Controllers\ProfileController;
|
|
use App\Http\Controllers\MailController;
|
|
use App\Http\Controllers\LangController;
|
|
|
|
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
|
|
Route::get('/lang/change', [App\Http\Controllers\LangController::class, 'change'])->name('changelang');
|