<?php

use Illuminate\Support\Facades\Route;

//manageuser
Route::any("/user","App\Http\Controllers\UserController@List");
Route::view("/adduser","manageuser/adduser");
Route::any("/insertuser","App\Http\Controllers\UserController@Insert");
Route::get("/deleteuser/{x}",function($idEncrypt){
	return view("manageuser/deleteuser",
				compact('idEncrypt'));
});

Route::any("/deleteuser/removeuser",
"App\Http\Controllers\UserController@Delete");


Route::get("/edituser/{x}",function($idEncrypt){
	return view("manageuser/edituser",
				compact('idEncrypt'));
});
Route::any("/edituser/updateuser",
"App\Http\Controllers\UserController@Update");







Route::any("/login","LoginController@CheckLogin");

Route::view("/pagelogin","login");


Route::view("/t","template/mainlayout");
Route::get('/data', function () {
    echo "Welcome ";
});

Route::get('/data/{nama}', function ($nama) {
    echo "Welcome $nama";
});

Route::get('/data/{nama}/{notel}', 
function ($nama,$notel) {
    return view("modul1/utama",
	compact("nama","notel")
	);
});


Route::middleware(["MiddlewareLogin"])->group(function(){
	Route::view("/main","utama");
	Route::view("/abc",'modul1/utama');
	Route::view("/about","aboutus");
	Route::view("/contact","contactus");
});

Route::any("/manageuser","App\Http\Controllers\UserController@View");

 

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