File: /var/www/agighana.org_backup/presidency.blade.php
@php
use App\Models\Presidency;
@endphp
@extends('layouts.app')
@section('head')
@endsection
@section('page-title')
<h1 class="page-heading d-flex text-dark fw-bold fs-3 flex-column justify-content-center my-0">Pending Members</h1>
@endsection
@section('body')
<div class="row">
<div class="col-md-12">
<button class="btn btn-primary float-end mb-7" type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#kt_modal_1">Add President</button>
</div>
</div>
<div class="card shadow">
<div class="card-body">
<div class="table-responsive">
<table class="table table-striped">
<thead>
<tr>
<th></th>
<th>Name</th>
<th>Company Name</th>
<th>Date</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<tbody>
@foreach (Presidency::all() as $item)
<tr>
<td><img class=" img-fluid" src="{{ asset('uploads/img/'.$item->img) }}" alt="" style="width: 100px"></td>
<td>{{ $item->name }}</td>
<td>{{ $item->comp_name }}</td>
<td>{{ date($item->from) .' - ' .date($item->to) }}</td>
<td></td>
</tr>
@endforeach
</tbody>
</tbody>
</table>
</div>
</div>
</div>
<div class="modal fade" tabindex="-1" id="kt_modal_1" data-bs-backdrop="static" data-bs-keyboard="false">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h3 class="modal-title">Add Presidency</h3>
<!--begin::Close-->
<div class="btn btn-icon btn-sm btn-active-light-primary ms-2" data-bs-dismiss="modal" aria-label="Close">
<i class="ki-duotone ki-cross fs-1"><span class="path1"></span><span class="path2"></span></i>
</div>
<!--end::Close-->
</div>
<div class="modal-body">
<form action="javascript:void(0)" id="create">
<div class="row">
<div class="col-md-6">
<label class=" form-label">Name</label>
<input type="text" name="name" class=" form-control form-control-solid" id="">
<span class=" alert-danger name-error" id=""></span>
</div>
<div class="col-md-6">
<label class=" form-label">Company Name</label>
<input name="comp_name" type="text" class=" form-control form-control-solid" id="">
<span class=" alert-danger comp_name-error" id=""></span>
</div>
</div>
<div class="row mt-7">
<div class="col-md-6">
<label class=" form-label">Date From(Year)</label>
<input type="text" name="from" class=" form-control form-control-solid" id="">
<span class=" alert-danger from-error" id=""></span>
</div>
<div class="col-md-6">
<label class=" form-label">Date To(Year)</label>
<input type="text" name="to" class=" form-control form-control-solid" id="">
<span class=" alert-danger to-error" id=""></span>
</div>
</div>
<div class="row mt-7">
<div class="col-md-6">
<label class=" form-label">Profile Pic</label>
<input name="img" type="file" class=" form-control form-control-solid" id="">
<span class=" alert-danger img-error" id=""></span>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-light" data-bs-dismiss="modal">Close</button>
<button type="submit" class="btn btn-primary">Save changes</button>
</div>
</form>
</div>
</div>
</div>
</div>
@endsection
@section('scripts')
<script src="{{ asset('assets/js/self/presidency.js') }}"></script>
@endsection