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

@@ -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!');
}
}