TaskA/resources/views/backend/user/all-user.blade.php
2024-06-18 15:28:01 +05:45

92 lines
4.5 KiB
PHP

@extends('backend.layouts.app')
@section('content')
<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper">
<!-- Main content -->
<section class="content">
<div class="container-fluid">
<div class="row">
<div class="col-12">
<div class="card">
<div class="card-header">
<h3 class="card-title">{{ __('List of Users') }}</h3>
</div>
<!-- /.card-header -->
<div class="card-body">
<table id="example1" class="table table-bordered table-striped">
<thead>
<tr>
<th>{{ __('Serial') }} </th>
<th>{{ __('Name') }}</th>
<th>{{ __('Email') }}</th>
<th>{{ __('Role') }}</th>
<th>{{ __('Action') }}</th>
</tr>
</thead>
<tbody>
@foreach ($all as $key => $row)
<tr>
<td scope="row">{{ $row->id }}</td>
<td>{{ $row->name }}</td>
<td>{{ $row->email }}</td>
<td>{{ $row->role }}</td>
</td>
<td>
<a href="{{ url('edit-user', $row->id) }}"
class="btn btn-sm btn-success">{{ __('Edit') }}</a>
<a href="{{ url('delete-user', $row->id) }}"
class="btn btn-sm btn-danger delete-btn">{{ __('Delete') }}</a>
<form action="{{ route('send-email') }}" method="POST"
style="display:inline;">
@csrf
<input type="hidden" name="name" value="{{ $row->name }}">
<input type="hidden" name="email" value="{{ $row->email }}">
<button type="submit"
class="btn btn-sm btn-primary">{{ __('Send Email') }}
</button>
{{-- <a href="{{ route('user.edit', $row->id) }}"
class="btn btn-sm btn-success">Edit</a>
<a href="{{ route('user.destroy', $row->id) }}"
class="btn btn-sm btn-danger">Delete</a> --}}
</td>
</tr>
@endforeach
</tbody>
<tfoot>
<tr>
<th>{{ __('Serial') }} </th>
<th>{{ __('Name') }}</th>
<th>{{ __('Email') }}Email</th>
<th>{{ __('Role') }}</th>
<th>{{ __('Action') }}</th>
</tr>
</tfoot>
</table>
</div>
<!-- /.card-body -->
</div>
<!-- /.card -->
</div>
<!-- /.col -->
</div>
<!-- /.row -->
</div>
<!-- /.container-fluid -->
</section>
<!-- /.content -->
</div>
@endsection