vpn.keks.cloud/resources/views/users/overview.blade.php
2020-11-08 03:07:10 +01:00

41 lines
1.4 KiB
PHP

<!-- Stored in resources/views/child.blade.php -->
@extends('layout.app')
@section('title', 'VPN')
@section('content')
<div class="row"">
<div class="col-md-12">
<h1>Users</h1>
@if ($errors->all())
<div class="alert alert-warning" role="alert">
<ul>
@foreach ($errors->all() as $error)
<li>{{ $error }}</li>
@endforeach
</ul>
</div>
@endif
<table class="table">
<tr>
<th>E-Mail</th>
<th>Create VPN</th>
<th>Admin</th>
<th class="text-right">Save</th>
</tr>
@foreach($users as $u)
<tr>
<form method="post">
@csrf
<td>{{ $u->email }}<input name="id" style="display: none" value="{{ $u->id }}"> </td>
<td><input type="checkbox" value="1" name="createVPN" @if($u->hasPrivilege("createVPN")) checked @endif> </td>
<td><input type="checkbox" value="1" name="admin" @if($u->hasPrivilege("admin")) checked @endif> </td>
<td><input type="submit" class="btn btn-primary btn-sm float-right" value="Save"> </td>
</form>
</tr>
@endforeach
</table>
</div>
</div>
@endsection