<?php

use Illuminate\Support\Facades\Route;
use App\Http\Controllers\AuthController;
use App\Http\Controllers\CustomerController;



Route::get('/', [AuthController::class,'login']);

Route::post('/login',
    [AuthController::class,'prosesLogin']);

Route::get('/dashboard',
    [AuthController::class,'dashboard']);

Route::get('/karyawan/tambah',
    [AuthController::class,'tambahKaryawan']);

Route::post('/karyawan/simpan',
    [AuthController::class,'simpanKaryawan']);

Route::get('/karyawan/hapus/{id}',
    [AuthController::class,'hapusKaryawan']);

Route::get(
    '/karyawan/edit/{id}',
    [AuthController::class,
    'editKaryawan']
);

Route::post(
    '/karyawan/update/{id}',
    [AuthController::class,
    'updateKaryawan']
);

Route::get('/customer', [CustomerController::class,'index']);

Route::get('/customer/tambah', [CustomerController::class,'tambah']);

Route::post('/customer/simpan',
    [CustomerController::class,'simpan']);

Route::get(
    '/customer/edit/{id}',
    [CustomerController::class, 'edit']
);

Route::post(
    '/customer/update/{id}',
    [CustomerController::class, 'update']
);

Route::get(
    '/customer/hapus/{id}',
    [CustomerController::class, 'hapus']
);
