관리-도구
편집 파일: pendinguser.blade.php
@extends('layouts.app') @section('content') <div class="row"> <div class="col-lg-12"> <div class="card"> <div class="card-header d-flex align-items-center"> <span class="panel-title">{{ _lang('User List') }}</span> <a class="btn btn-primary btn-xs ml-auto ajax-modal" data-title="{{ _lang('Create User') }}" href="{{ route('users.create') }}">{{ _lang('Add New') }}</a> </div> <div class="card-body"> <table id="users_table" class="table table-bordered data-table"> <thead> <tr> <th>Name</th> <th>Email</th> <th>Status</th> <th>Action</th> </tr> </thead> <tbody> @foreach($pendingUsers as $user) <tr> <td>{{ $user->name }}</td> <td>{{ $user->email }}</td> <td> @if($user->status == 0) Pending @elseif($user->status == 1) Approved @endif </td> <td> @if($user->status == 0) <form action="{{ route('admin.users.toggleStatus', $user->id) }}" method="POST"> @csrf @method('POST') <select name="status" class="form-control" onchange="this.form.submit()"> <option value="1" {{ $user->status == 1 ? 'selected' : '' }}>Approve</option> <option value="0" {{ $user->status == 0 ? 'selected' : '' }}>Unapprove</option> </select> </form> @endif </td> </tr> @endforeach </tbody> </table> </div> </div> </div> </div> @endsection