user model is added login/logout
This commit is contained in:
34
app/Http/Controllers/Admin/AdminMarkListController.php
Normal file
34
app/Http/Controllers/Admin/AdminMarkListController.php
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers\Admin;
|
||||||
|
|
||||||
|
use App\Http\Controllers\Controller;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
use App\Models\MarkList;
|
||||||
|
|
||||||
|
class AdminMarkListController extends Controller
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Show all mark list entries in descending order (latest first)
|
||||||
|
*/
|
||||||
|
public function index()
|
||||||
|
{
|
||||||
|
$markList = MarkList::orderBy('id', 'desc')->get();
|
||||||
|
|
||||||
|
return view('admin.mark_list', compact('markList'));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Toggle status between Active and Inactive
|
||||||
|
*/
|
||||||
|
public function toggleStatus($id)
|
||||||
|
{
|
||||||
|
$mark = MarkList::findOrFail($id);
|
||||||
|
|
||||||
|
// Toggle logic
|
||||||
|
$mark->status = $mark->status === 'active' ? 'inactive' : 'active';
|
||||||
|
$mark->save();
|
||||||
|
|
||||||
|
return redirect()->back()->with('success', 'Status updated successfully!');
|
||||||
|
}
|
||||||
|
}
|
||||||
95
app/Http/Controllers/MarkListController.php
Normal file
95
app/Http/Controllers/MarkListController.php
Normal file
@@ -0,0 +1,95 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
use App\Models\MarkList;
|
||||||
|
use App\Models\User;
|
||||||
|
use Carbon\Carbon;
|
||||||
|
use PHPOpenSourceSaver\JWTAuth\Facades\JWTAuth;
|
||||||
|
|
||||||
|
class MarkListController extends Controller
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Add new Mark No (entered by user)
|
||||||
|
*/
|
||||||
|
public function addmarkno(Request $request)
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
// Validate input
|
||||||
|
$request->validate([
|
||||||
|
'mark_no' => 'required|string|max:255|unique:mark_list,mark_no',
|
||||||
|
'origin' => 'required|string|max:255',
|
||||||
|
'destination' => 'required|string|max:255',
|
||||||
|
]);
|
||||||
|
} catch (\Illuminate\Validation\ValidationException $e) {
|
||||||
|
// Check if the mark_no uniqueness failed
|
||||||
|
if (isset($e->validator->failed()['mark_no']['Unique'])) {
|
||||||
|
return response()->json([
|
||||||
|
'success' => false,
|
||||||
|
'message' => 'Mark No already taken by another customer.'
|
||||||
|
], 400);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Default validation error
|
||||||
|
return response()->json([
|
||||||
|
'success' => false,
|
||||||
|
'message' => $e->getMessage()
|
||||||
|
], 400);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Authenticate user via JWT
|
||||||
|
$user = JWTAuth::parseToken()->authenticate();
|
||||||
|
|
||||||
|
if (!$user) {
|
||||||
|
return response()->json([
|
||||||
|
'success' => false,
|
||||||
|
'message' => 'Unauthorized'
|
||||||
|
], 401);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create mark record
|
||||||
|
$mark = MarkList::create([
|
||||||
|
'mark_no' => $request->mark_no,
|
||||||
|
'origin' => $request->origin,
|
||||||
|
'destination' => $request->destination,
|
||||||
|
'customer_id' => $user->customer_id,
|
||||||
|
'customer_name' => $user->customer_name,
|
||||||
|
'company_name' => $user->company_name,
|
||||||
|
'mobile_no' => $user->mobile_no,
|
||||||
|
'date' => Carbon::now()->toDateString(),
|
||||||
|
'status' => 'active',
|
||||||
|
]);
|
||||||
|
|
||||||
|
return response()->json([
|
||||||
|
'success' => true,
|
||||||
|
'message' => 'Mark No added successfully.',
|
||||||
|
'data' => $mark
|
||||||
|
], 200);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show all marks for the logged-in user
|
||||||
|
*/
|
||||||
|
public function showmarklist()
|
||||||
|
{
|
||||||
|
$user = JWTAuth::parseToken()->authenticate();
|
||||||
|
|
||||||
|
if (!$user) {
|
||||||
|
return response()->json([
|
||||||
|
'success' => false,
|
||||||
|
'message' => 'Unauthorized'
|
||||||
|
], 401);
|
||||||
|
}
|
||||||
|
|
||||||
|
$marks = MarkList::where('customer_id', $user->customer_id)
|
||||||
|
->orderBy('id', 'desc')
|
||||||
|
->get();
|
||||||
|
|
||||||
|
return response()->json([
|
||||||
|
'success' => true,
|
||||||
|
'data' => $marks
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -2,28 +2,24 @@
|
|||||||
|
|
||||||
namespace App\Models;
|
namespace App\Models;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
class MarkList extends Model
|
class MarkList extends Model
|
||||||
{
|
{
|
||||||
protected $table = 'mark_lists';
|
use HasFactory;
|
||||||
|
|
||||||
|
protected $table = 'mark_list';
|
||||||
|
|
||||||
protected $fillable = [
|
protected $fillable = [
|
||||||
'mark_no', // e.g., MARK-2025-000001
|
'mark_no',
|
||||||
'origin',
|
'origin',
|
||||||
'destination',
|
'destination',
|
||||||
'customer_name',
|
|
||||||
'mobile_no',
|
|
||||||
'customer_id',
|
'customer_id',
|
||||||
|
'customer_name',
|
||||||
|
'company_name',
|
||||||
|
'mobile_no',
|
||||||
'date',
|
'date',
|
||||||
'status',
|
'status'
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
|
||||||
* Relationship: each mark list belongs to a customer (user)
|
|
||||||
*/
|
|
||||||
public function customer()
|
|
||||||
{
|
|
||||||
return $this->belongsTo(User::class, 'customer_id');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,45 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
use Illuminate\Database\Migrations\Migration;
|
|
||||||
use Illuminate\Database\Schema\Blueprint;
|
|
||||||
use Illuminate\Support\Facades\Schema;
|
|
||||||
|
|
||||||
return new class extends Migration
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Run the migrations.
|
|
||||||
*/
|
|
||||||
public function up()
|
|
||||||
{
|
|
||||||
Schema::create('mark_lists', function (Blueprint $table) {
|
|
||||||
$table->id();
|
|
||||||
|
|
||||||
// Order as requested:
|
|
||||||
$table->string('mark_no');
|
|
||||||
$table->string('origin');
|
|
||||||
$table->string('destination');
|
|
||||||
$table->string('customer_name');
|
|
||||||
$table->string('mobile_no');
|
|
||||||
$table->unsignedBigInteger('customer_id');
|
|
||||||
$table->date('date')->nullable();
|
|
||||||
$table->enum('status', ['active', 'inactive'])->default('active');
|
|
||||||
|
|
||||||
$table->timestamps();
|
|
||||||
|
|
||||||
// Foreign key constraint
|
|
||||||
$table->foreign('customer_id')
|
|
||||||
->references('id')
|
|
||||||
->on('users')
|
|
||||||
->onDelete('cascade');
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Reverse the migrations.
|
|
||||||
*/
|
|
||||||
public function down(): void
|
|
||||||
{
|
|
||||||
Schema::dropIfExists('mark_lists');
|
|
||||||
}
|
|
||||||
};
|
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::create('mark_list', function (Blueprint $table) {
|
||||||
|
$table->id();
|
||||||
|
$table->string('mark_no')->unique();
|
||||||
|
$table->string('origin');
|
||||||
|
$table->string('destination');
|
||||||
|
$table->string('customer_id');
|
||||||
|
$table->string('customer_name');
|
||||||
|
$table->string('company_name')->nullable();
|
||||||
|
$table->string('mobile_no');
|
||||||
|
$table->date('date')->nullable();
|
||||||
|
$table->enum('status', ['active', 'inactive'])->default('active');
|
||||||
|
$table->timestamps();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::dropIfExists('mark_list');
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -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.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.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.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">
|
<form method="POST" action="{{ route('admin.logout') }}" class="mt-4 px-3">
|
||||||
@csrf
|
@csrf
|
||||||
|
|||||||
@@ -2,23 +2,117 @@
|
|||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>Admin Login</title>
|
<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>
|
</head>
|
||||||
<body class="bg-light">
|
<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">
|
<!-- Company Name -->
|
||||||
<div class="row justify-content-center">
|
<div style="font-size: 1.15rem; font-weight: 600; color: #800000; letter-spacing: 1px; margin-bottom: 25px;">
|
||||||
<div class="col-md-4">
|
KENT International Pvt. Ltd.
|
||||||
<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>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="card-body">
|
<div class="card shadow">
|
||||||
|
<div class="card-header">
|
||||||
|
<h4>Admin Login</h4>
|
||||||
|
</div>
|
||||||
|
<div class="card-body text-start">
|
||||||
@if ($errors->any())
|
@if ($errors->any())
|
||||||
<div class="alert alert-danger">
|
<div class="alert alert-danger">
|
||||||
{{ $errors->first() }}
|
{{ $errors->first() }}
|
||||||
@@ -39,11 +133,15 @@
|
|||||||
|
|
||||||
<button type="submit" class="btn btn-primary w-100">Login</button>
|
<button type="submit" class="btn btn-primary w-100">Login</button>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
|
||||||
|
<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>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
60
resources/views/admin/mark_list.blade.php
Normal file
60
resources/views/admin/mark_list.blade.php
Normal 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
|
||||||
@@ -3,6 +3,7 @@
|
|||||||
use Illuminate\Support\Facades\Route;
|
use Illuminate\Support\Facades\Route;
|
||||||
use App\Http\Controllers\RequestController;
|
use App\Http\Controllers\RequestController;
|
||||||
use App\Http\Controllers\UserAuthController;
|
use App\Http\Controllers\UserAuthController;
|
||||||
|
use App\Http\Controllers\MarkListController;
|
||||||
|
|
||||||
//user send request
|
//user send request
|
||||||
Route::post('/signup-request', [RequestController::class, 'usersignup']);
|
Route::post('/signup-request', [RequestController::class, 'usersignup']);
|
||||||
@@ -10,3 +11,10 @@ Route::post('/signup-request', [RequestController::class, 'usersignup']);
|
|||||||
//login / logout
|
//login / logout
|
||||||
Route::post('/user/login', [UserAuthController::class, 'login']);
|
Route::post('/user/login', [UserAuthController::class, 'login']);
|
||||||
Route::post('/user/logout', [UserAuthController::class, 'logout'])->middleware('auth:api');
|
Route::post('/user/logout', [UserAuthController::class, 'logout'])->middleware('auth:api');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Route::middleware(['auth:api'])->group(function () {
|
||||||
|
Route::get('/show-mark-list', [MarkListController::class, 'showmarklist']); // Fetch all marks by user
|
||||||
|
Route::post('/add-mark-no', [MarkListController::class, 'addmarkno']); // Create new mark
|
||||||
|
});
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
use Illuminate\Support\Facades\Route;
|
use Illuminate\Support\Facades\Route;
|
||||||
use App\Http\Controllers\Admin\AdminAuthController;
|
use App\Http\Controllers\Admin\AdminAuthController;
|
||||||
use App\Http\Controllers\Admin\UserRequestController;
|
use App\Http\Controllers\Admin\UserRequestController;
|
||||||
|
use App\Http\Controllers\Admin\AdminMarkListController;
|
||||||
|
|
||||||
// -------------------------
|
// -------------------------
|
||||||
// Default Front Page
|
// Default Front Page
|
||||||
@@ -35,8 +36,13 @@ Route::prefix('admin')->middleware('auth:admin')->group(function () {
|
|||||||
Route::get('/staff', fn() => view('admin.staff'))->name('admin.staff');
|
Route::get('/staff', fn() => view('admin.staff'))->name('admin.staff');
|
||||||
Route::get('/account', fn() => view('admin.account'))->name('admin.account');
|
Route::get('/account', fn() => view('admin.account'))->name('admin.account');
|
||||||
|
|
||||||
|
|
||||||
// ✅ User Requests Controller Routes
|
// ✅ User Requests Controller Routes
|
||||||
Route::get('/requests', [UserRequestController::class, 'index'])->name('admin.requests');
|
Route::get('/requests', [UserRequestController::class, 'index'])->name('admin.requests');
|
||||||
Route::get('/requests/approve/{id}', [UserRequestController::class, 'approve'])->name('admin.requests.approve');
|
Route::get('/requests/approve/{id}', [UserRequestController::class, 'approve'])->name('admin.requests.approve');
|
||||||
Route::get('/requests/reject/{id}', [UserRequestController::class, 'reject'])->name('admin.requests.reject');
|
Route::get('/requests/reject/{id}', [UserRequestController::class, 'reject'])->name('admin.requests.reject');
|
||||||
|
|
||||||
|
//mark list show
|
||||||
|
Route::get('/mark-list', [AdminMarkListController::class, 'index'])->name('admin.marklist.index');
|
||||||
|
Route::get('/mark-list/status/{id}', [AdminMarkListController::class, 'toggleStatus'])->name('admin.marklist.toggle');
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user