@extends('layouts.app')
@section('page_title', 'Data Admin')
@section('content')
@include('admin.partials.crud-table', [
    'title' => 'Admin',
    'headers' => ['Username', 'Nama', 'Email', 'Akses'],
    'columns' => ['username', 'nama', 'email', 'akses'],
    'rows' => $data,
    'primaryKey' => 'id_user',
    'storeRoute' => 'admin.data.admin.store',
    'updateRoute' => 'admin.data.admin.update',
    'deleteRoute' => 'admin.data.admin.destroy',
    'fields' => [
        ['name' => 'username', 'label' => 'Username', 'type' => 'text', 'required' => true],
        ['name' => 'password', 'label' => 'Password', 'type' => 'password', 'required' => true],
        ['name' => 'nama', 'label' => 'Nama Lengkap', 'type' => 'text', 'required' => true],
        ['name' => 'email', 'label' => 'Email', 'type' => 'email'],
    ],
])
@endsection
