user model is added login/logout

This commit is contained in:
Abhishek Mali
2025-11-07 17:34:56 +05:30
parent 5b764c7597
commit 7c7ac7683a
10 changed files with 375 additions and 92 deletions

View File

@@ -85,6 +85,7 @@
<a href="{{ route('admin.requests') }}" class="{{ request()->routeIs('admin.requests') ? 'active' : '' }}"><i class="bi bi-envelope"></i> Requests</a>
<a href="{{ route('admin.staff') }}" class="{{ request()->routeIs('admin.staff') ? 'active' : '' }}"><i class="bi bi-person-badge"></i> Staff</a>
<a href="{{ route('admin.account') }}" class="{{ request()->routeIs('admin.account') ? 'active' : '' }}"><i class="bi bi-gear"></i> Account</a>
<a href="{{ route('admin.marklist.index') }}" class="{{ request()->routeIs('admin.marklist.index') ? 'active' : '' }}"><i class="bi bi-gear"></i> mark_list</a>
<form method="POST" action="{{ route('admin.logout') }}" class="mt-4 px-3">
@csrf

View File

@@ -2,48 +2,146 @@
<html>
<head>
<title>Admin Login</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
<style>
body.bg-light {
background: #f6fbff;
min-height: 100vh;
font-family: 'Segoe UI', 'Roboto', Arial, sans-serif;
}
.container {
max-width: 400px;
}
.card {
border: none;
border-radius: 18px;
box-shadow: 0 8px 24px 0 rgba(30,62,124,0.09), 0 1.5px 6px 0 rgba(30,62,124,0.13);
background: #fff;
}
.card-header {
border-radius: 18px 18px 0 0 !important;
background: linear-gradient(90deg, #bf232c 65%, #f9b835 100%);
padding: 36px 0 18px 0;
border-bottom: none;
}
.card-header h4 {
color: #fff;
letter-spacing: 1px;
font-size: 1.6rem;
font-weight: 600;
margin: 0;
}
.card-body {
padding: 30px 28px 24px 28px;
}
label {
font-size: 1rem;
color: #222e48;
font-weight: 500;
margin-bottom: 6px;
}
.form-control {
border-radius: 12px;
border: 1.8px solid #d6e1ec;
background: #f3f8ff;
box-shadow: none;
font-size: 1.05rem;
font-weight: 500;
padding: 10px 12px;
transition: border 0.20s;
}
.form-control:focus {
border-color: #ba2530;
box-shadow: 0 0 0 2px #f9b83533;
}
.btn-primary {
background: linear-gradient(90deg, #1636b4 0%, #23beda 100%);
border: none;
border-radius: 10px;
font-weight: 600;
font-size: 1.14rem;
padding: 10px 0;
box-shadow: 0 2px 9px 0 rgba(30,62,124,0.12);
transition: background 0.20s, box-shadow 0.20s;
}
.btn-primary:hover, .btn-primary:focus {
background: linear-gradient(90deg, #2d4ee8 10%, #f9b835 100%);
box-shadow: 0 7px 18px 0 rgba(23,104,173,0.08);
}
.alert-danger {
font-size: 1rem;
background: #ffe0e6;
color: #bf232c;
border-radius: 9px;
border: 1.5px solid #ffd5dd;
}
.secure-encrypted {
color: green;
font-weight: 600;
margin-top: 15px;
display: flex;
justify-content: center;
align-items: center;
gap: 6px;
}
@media (max-width: 550px) {
.card {
border-radius: 16px !important;
padding: 0px !important;
}
.card-body {
padding: 22px 9px 20px 9px;
}
.container {
max-width: 90%;
}
}
</style>
</head>
<body class="bg-light">
<div class="container mt-5 text-center">
<!-- Logo -->
<img src="{{ asset('images/kent-logo.png') }}" alt="KENT Logo" style="max-width: 140px; margin-bottom: 8px;">
<div class="container mt-5">
<div class="row justify-content-center">
<div class="col-md-4">
<div class="card shadow">
<div class="card-header text-center bg-primary text-white">
{{-- Kent Logo --}}
<img src="{{ asset('img/kent-logo.png') }}"
alt="KENT Logo"
style="max-width: 140px; margin-bottom: 8px;">
<h4 class="mt-2">Admin Login</h4>
<!-- Company Name -->
<div style="font-size: 1.15rem; font-weight: 600; color: #800000; letter-spacing: 1px; margin-bottom: 25px;">
KENT International Pvt. Ltd.
</div>
<div class="card shadow">
<div class="card-header">
<h4>Admin Login</h4>
</div>
<div class="card-body text-start">
@if ($errors->any())
<div class="alert alert-danger">
{{ $errors->first() }}
</div>
@endif
<form method="POST" action="{{ route('admin.login.submit') }}">
@csrf
<div class="mb-3">
<label>Email</label>
<input type="email" name="email" class="form-control" value="{{ old('email') }}" required>
</div>
<div class="card-body">
@if ($errors->any())
<div class="alert alert-danger">
{{ $errors->first() }}
</div>
@endif
<form method="POST" action="{{ route('admin.login.submit') }}">
@csrf
<div class="mb-3">
<label>Email</label>
<input type="email" name="email" class="form-control" value="{{ old('email') }}" required>
</div>
<div class="mb-3">
<label>Password</label>
<input type="password" name="password" class="form-control" required>
</div>
<button type="submit" class="btn btn-primary w-100">Login</button>
</form>
<div class="mb-3">
<label>Password</label>
<input type="password" name="password" class="form-control" required>
</div>
<button type="submit" class="btn btn-primary w-100">Login</button>
</form>
<div class="secure-encrypted">
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" fill="green" class="bi bi-lock-fill" viewBox="0 0 16 16">
<path d="M8 1a3 3 0 0 0-3 3v3H4a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2v-4a2 2 0 0 0-2-2h-1V4a3 3 0 0 0-3-3z"/>
</svg>
Secure & Encrypted
</div>
</div>
</div>
</div>
</body>
</html>

View File

@@ -0,0 +1,60 @@
@extends('admin.layouts.app')
@section('page-title', 'Mark List')
@section('content')
<div class="card shadow-sm">
<div class="card-body">
<h4 class="mb-3">Mark List Management</h4>
@if(session('success'))
<div class="alert alert-success">{{ session('success') }}</div>
@endif
<table class="table table-bordered table-hover align-middle">
<thead class="table-dark">
<tr>
<th>#</th>
<th>Mark No</th>
<th>Origin</th>
<th>Destination</th>
<th>Customer Name</th>
<th>Mobile</th>
<th>Date</th>
<th>Status</th>
<th>Action</th>
</tr>
</thead>
<tbody>
@forelse($markList as $index => $mark)
<tr>
<td>{{ $mark->id }}</td>
<td>{{ $mark->mark_no }}</td>
<td>{{ $mark->origin }}</td>
<td>{{ $mark->destination }}</td>
<td>{{ $mark->customer_name }}</td>
<td>{{ $mark->mobile_no }}</td>
<td>{{ \Carbon\Carbon::parse($mark->date)->format('d-m-Y') }}</td>
<td>
@if($mark->status == 'active')
<span class="badge bg-success">Active</span>
@else
<span class="badge bg-danger">Inactive</span>
@endif
</td>
<td>
<a href="{{ route('admin.marklist.toggle', $mark->id) }}" class="btn btn-sm btn-primary">
{{ $mark->status == 'active' ? 'Deactivate' : 'Activate' }}
</a>
</td>
</tr>
@empty
<tr>
<td colspan="9" class="text-center text-muted">No mark numbers found.</td>
</tr>
@endforelse
</tbody>
</table>
</div>
</div>
@endsection