Feat: Activities Controller totally independent
This commit is contained in:
184
app/Http/Controllers/ActivitiesAttendedController.php
Normal file
184
app/Http/Controllers/ActivitiesAttendedController.php
Normal file
@@ -0,0 +1,184 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Yajra\DataTables\Facades\DataTables;
|
||||
use App\Models\ActivitiesAttended;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
|
||||
class ActivitiesAttendedController extends Controller
|
||||
{
|
||||
|
||||
public function edit($id)
|
||||
{
|
||||
$response = ActivitiesAttended::findOrFail($id);
|
||||
|
||||
return view('activities-attended.edit', compact('response'));
|
||||
}
|
||||
|
||||
public function update(Request $request, $id)
|
||||
{
|
||||
$response = ActivitiesAttended::findOrFail($id);
|
||||
|
||||
// Validate the request data
|
||||
$validated = $request->validate([
|
||||
'title' => 'required|string',
|
||||
'organising_institute' => 'required|string',
|
||||
'address' => 'required|string',
|
||||
'start_date' => 'required|date',
|
||||
'start_time' => 'required|date_format:H:i',
|
||||
'end_date' => 'required|date',
|
||||
'end_time' => 'required|date_format:H:i',
|
||||
'num_days' => 'required|integer',
|
||||
'activity_type' => 'required|string',
|
||||
'category' => 'required|string',
|
||||
'level' => 'required|string',
|
||||
'proof' => 'nullable|mimes:jpg,jpeg,png,pdf,doc,docx,zip',
|
||||
]);
|
||||
|
||||
// Combine start date and time
|
||||
$startDateTime = date('Y-m-d H:i:s', strtotime("{$validated['start_date']} {$validated['start_time']}"));
|
||||
$endDateTime = date('Y-m-d H:i:s', strtotime("{$validated['end_date']} {$validated['end_time']}"));
|
||||
|
||||
// Handle the file upload if a new file is provided
|
||||
if ($request->hasFile('proof')) {
|
||||
// Delete old file if exists
|
||||
if ($response->proof && Storage::disk('public')->exists($response->proof)) {
|
||||
Storage::disk('public')->delete($response->proof);
|
||||
}
|
||||
|
||||
// Extract year from start_date
|
||||
$year = date('Y', strtotime($validated['start_date']));
|
||||
$username = $response->user->name;
|
||||
|
||||
$originalName = $request->file('proof')->getClientOriginalName();
|
||||
$fileName = $username . '_' . $originalName;
|
||||
|
||||
// Create path structure: year/faculty_name
|
||||
$folderPath = 'proofs/' . $year . '/' . $username;
|
||||
|
||||
// Store file in the specified path
|
||||
$proofPath = $request->file('proof')->storeAs($folderPath, $fileName, 'public');
|
||||
|
||||
$response->proof = $proofPath;
|
||||
}
|
||||
|
||||
// Update other fields
|
||||
$response->title = $validated['title'];
|
||||
$response->organising_institute = $validated['organising_institute'];
|
||||
$response->address = $validated['address'];
|
||||
$response->start_date = $startDateTime;
|
||||
$response->end_date = $endDateTime;
|
||||
$response->num_days = $validated['num_days'];
|
||||
$response->activity_type = $validated['activity_type'];
|
||||
$response->category = $validated['category'];
|
||||
$response->level = $validated['level'];
|
||||
|
||||
$response->save();
|
||||
|
||||
$userRole = auth()->user()->role->name;
|
||||
// dd($userRole);
|
||||
|
||||
if ($userRole === 'Admin') {
|
||||
return redirect()->route('admin.ActivitiesAttendedResponses')
|
||||
->with('status', 'Response updated successfully');
|
||||
} elseif ($userRole === 'Coordinator') {
|
||||
return redirect()->route('coordinator.ActivitiesAttendedResponses')
|
||||
->with('status', 'Response updated successfully');
|
||||
} else {
|
||||
// For regular users
|
||||
return redirect()->route('faculty.ActivitiesAttendedResponses')
|
||||
->with('status', 'Response updated successfully');
|
||||
}
|
||||
// return redirect()->route('admin.ActivitiesAttendedResponses')->with('status', 'Response updated successfully');
|
||||
}
|
||||
|
||||
public function destroy($id)
|
||||
{
|
||||
$response = ActivitiesAttended::findOrFail($id);
|
||||
|
||||
// Delete the file if it exists
|
||||
if ($response->proof && Storage::disk('public')->exists($response->proof)) {
|
||||
Storage::disk('public')->delete($response->proof);
|
||||
}
|
||||
|
||||
$response->delete();
|
||||
|
||||
return response()->json(['success' => 'Record deleted successfully']);
|
||||
}
|
||||
|
||||
public function getActivitiesAttendedResponses()
|
||||
{
|
||||
$user = auth()->user();
|
||||
$isAdmin = $user->role->name === 'Admin';
|
||||
$isCoordinator = $user->role->name === 'Coordinator';
|
||||
|
||||
// Query based on role
|
||||
if ($isAdmin) {
|
||||
// Admin sees all records
|
||||
$responses = ActivitiesAttended::with('user', 'department');
|
||||
} elseif ($isCoordinator) {
|
||||
// Coordinator sees only their department's records
|
||||
$responses = ActivitiesAttended::with('user', 'department')
|
||||
->whereHas('user', function ($query) use ($user) {
|
||||
$query->where('department_id', $user->department_id);
|
||||
});
|
||||
} else {
|
||||
// Regular users see only their own records
|
||||
$responses = ActivitiesAttended::with('user', 'department')
|
||||
->where('faculty_id', $user->id);
|
||||
}
|
||||
|
||||
return DataTables::of($responses)
|
||||
->addColumn('user_name', function ($response) {
|
||||
return $response->user->name ?? 'Unknown';
|
||||
})
|
||||
->addColumn('department_name', function ($response) {
|
||||
return $response->department->name ?? 'Unknown';
|
||||
})
|
||||
->addColumn('start_date', function ($response) {
|
||||
return \Carbon\Carbon::parse($response->start_date)->format('d-m-Y');
|
||||
})
|
||||
->addColumn('start_time', function ($response) {
|
||||
return \Carbon\Carbon::parse($response->start_date)->format('h:i A');
|
||||
})
|
||||
->addColumn('end_date', function ($response) {
|
||||
return \Carbon\Carbon::parse($response->end_date)->format('d-m-Y');
|
||||
})
|
||||
->addColumn('end_time', function ($response) {
|
||||
return \Carbon\Carbon::parse($response->end_date)->format('h:i A');
|
||||
})
|
||||
->addColumn('action', function ($response) {
|
||||
$actions = [];
|
||||
|
||||
// View proof button for everyone
|
||||
if ($response->proof) {
|
||||
$actions[] = '<a href="' . asset('storage/' . $response->proof) . '" target="_blank" class="btn btn-sm btn-primary mr-1">View</a>';
|
||||
} else {
|
||||
$actions[] = 'No Proof';
|
||||
}
|
||||
|
||||
// Edit button with role-appropriate route
|
||||
$userRole = auth()->user()->role->name;
|
||||
// Determine the appropriate route based on user role
|
||||
if ($userRole === 'Admin') {
|
||||
$editRoute = route('admin.ActivitiesAttended.edit', $response->id);
|
||||
} elseif ($userRole === 'Coordinator') {
|
||||
$editRoute = route('coordinator.ActivitiesAttended.edit', $response->id);
|
||||
} else {
|
||||
$editRoute = route('faculty.ActivitiesAttended.edit', $response->id);
|
||||
}
|
||||
|
||||
$actions[] = '<a href="' . $editRoute . '" class="btn btn-sm btn-info mx-1">Edit</a>';
|
||||
|
||||
$deleteRoute = route('activitiesAttended.destroy', $response->id);
|
||||
$actions[] = '<button type="button" class="btn btn-sm btn-danger delete-btn" data-id="' . $response->id . '" data-url="' . $deleteRoute . '">Delete</button>';
|
||||
|
||||
|
||||
return implode(' ', $actions);
|
||||
})
|
||||
->rawColumns(['action'])
|
||||
->make(true);
|
||||
}
|
||||
}
|
||||
@@ -20,127 +20,7 @@ class AdminController extends Controller
|
||||
// View responses submitted by users
|
||||
public function viewActivitiesAttendedResponses()
|
||||
{
|
||||
return view('admin.activities-attended-responses');
|
||||
}
|
||||
|
||||
public function edit($id)
|
||||
{
|
||||
$response = ActivitiesAttended::findOrFail($id);
|
||||
return view('admin.activities-attended.edit', compact('response'));
|
||||
}
|
||||
|
||||
public function update(Request $request, $id)
|
||||
{
|
||||
$response = ActivitiesAttended::findOrFail($id);
|
||||
|
||||
// Validate the request data
|
||||
$validated = $request->validate([
|
||||
'title' => 'required|string',
|
||||
'organising_institute' => 'required|string',
|
||||
'address' => 'required|string',
|
||||
'start_date' => 'required|date',
|
||||
'start_time' => 'required|date_format:H:i',
|
||||
'end_date' => 'required|date',
|
||||
'end_time' => 'required|date_format:H:i',
|
||||
'num_days' => 'required|integer',
|
||||
'activity_type' => 'required|string',
|
||||
'category' => 'required|string',
|
||||
'level' => 'required|string',
|
||||
'proof' => 'nullable|mimes:jpg,jpeg,png,pdf,doc,docx,zip',
|
||||
]);
|
||||
|
||||
// Combine start date and time
|
||||
$startDateTime = date('Y-m-d H:i:s', strtotime("{$validated['start_date']} {$validated['start_time']}"));
|
||||
$endDateTime = date('Y-m-d H:i:s', strtotime("{$validated['end_date']} {$validated['end_time']}"));
|
||||
|
||||
// Handle the file upload if a new file is provided
|
||||
if ($request->hasFile('proof')) {
|
||||
// Delete old file if exists
|
||||
if ($response->proof && Storage::disk('public')->exists($response->proof)) {
|
||||
Storage::disk('public')->delete($response->proof);
|
||||
}
|
||||
|
||||
// Extract year from start_date
|
||||
$year = date('Y', strtotime($validated['start_date']));
|
||||
$username = $response->user->name;
|
||||
|
||||
$originalName = $request->file('proof')->getClientOriginalName();
|
||||
$fileName = $username . '_' . $originalName;
|
||||
|
||||
// Create path structure: year/faculty_name
|
||||
$folderPath = 'proofs/' . $year . '/' . $username;
|
||||
|
||||
// Store file in the specified path
|
||||
$proofPath = $request->file('proof')->storeAs($folderPath, $fileName, 'public');
|
||||
|
||||
$response->proof = $proofPath;
|
||||
}
|
||||
|
||||
// Update other fields
|
||||
$response->title = $validated['title'];
|
||||
$response->organising_institute = $validated['organising_institute'];
|
||||
$response->address = $validated['address'];
|
||||
$response->start_date = $startDateTime;
|
||||
$response->end_date = $endDateTime;
|
||||
$response->num_days = $validated['num_days'];
|
||||
$response->activity_type = $validated['activity_type'];
|
||||
$response->category = $validated['category'];
|
||||
$response->level = $validated['level'];
|
||||
|
||||
$response->save();
|
||||
|
||||
return redirect()->route('admin.ActivitiesAttendedResponses')->with('status', 'Response updated successfully');
|
||||
}
|
||||
|
||||
public function destroy($id)
|
||||
{
|
||||
$response = ActivitiesAttended::findOrFail($id);
|
||||
|
||||
// Delete the file if it exists
|
||||
if ($response->proof && Storage::disk('public')->exists($response->proof)) {
|
||||
Storage::disk('public')->delete($response->proof);
|
||||
}
|
||||
|
||||
$response->delete();
|
||||
|
||||
return response()->json(['success' => 'Record deleted successfully']);
|
||||
}
|
||||
|
||||
public function getActivitiesAttendedResponses()
|
||||
{
|
||||
$responses = ActivitiesAttended::with('user', 'department');
|
||||
|
||||
return DataTables::of($responses)
|
||||
->addColumn('user_name', function ($response) {
|
||||
return $response->user->name ?? 'Unknown';
|
||||
})
|
||||
->addColumn('department_name', function ($response) {
|
||||
return $response->department->name ?? 'Unknown';
|
||||
})
|
||||
->addColumn('start_date', function ($response) {
|
||||
return \Carbon\Carbon::parse($response->start_date)->format('d-m-Y');
|
||||
})
|
||||
->addColumn('start_time', function ($response) {
|
||||
return \Carbon\Carbon::parse($response->start_date)->format('h:i A');
|
||||
})
|
||||
->addColumn('end_date', function ($response) {
|
||||
return \Carbon\Carbon::parse($response->end_date)->format('d-m-Y');
|
||||
})
|
||||
->addColumn('end_time', function ($response) {
|
||||
return \Carbon\Carbon::parse($response->end_date)->format('h:i A');
|
||||
})
|
||||
->addColumn('action', function ($response) {
|
||||
$viewButton = $response->proof
|
||||
? '<a href="' . asset('storage/' . $response->proof) . '" target="_blank" class="btn btn-sm btn-primary mr-1">View</a>'
|
||||
: 'No Proof';
|
||||
|
||||
$editButton = '<a href="' . route('admin.ActivitiesAttended.edit', $response->id) . '" class="btn btn-sm btn-info mx-1">Edit</a>';
|
||||
|
||||
$deleteButton = '<button type="button" class="btn btn-sm btn-danger delete-btn" data-id="' . $response->id . '">Delete</button>';
|
||||
|
||||
return $viewButton . ' ' . $editButton . ' ' . $deleteButton;
|
||||
})
|
||||
->rawColumns(['action'])
|
||||
->make(true);
|
||||
return view('activities-attended.index');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -18,49 +18,7 @@ class CoordinatorController extends Controller
|
||||
// View responses submitted by users
|
||||
public function viewActivitiesAttendedResponses()
|
||||
{
|
||||
return view('coordinator.activities-attended-responses');
|
||||
return view('activities-attended.index');
|
||||
}
|
||||
|
||||
|
||||
public function getActivitiesAttendedResponses()
|
||||
{
|
||||
// Get the current logged-in user
|
||||
$currentUser = Auth::user();
|
||||
|
||||
// Get the department ID of the current user
|
||||
$userDepartmentId = $currentUser->department->id ?? null;
|
||||
|
||||
// Fetch the responses and filter by department_id
|
||||
$responses = ActivitiesAttended::with('user', 'department')
|
||||
->where('department_id', $userDepartmentId); // Filter by current user's department_id
|
||||
|
||||
return DataTables::of($responses)
|
||||
->addColumn('user_name', function ($response) {
|
||||
return $response->user->name ?? 'Unknown';
|
||||
})
|
||||
->addColumn('department_name', function ($response) {
|
||||
return $response->department->name ?? 'Unknown';
|
||||
})
|
||||
->addColumn('start_date', function ($response) {
|
||||
return \Carbon\Carbon::parse($response->start_date)->format('d-m-Y');
|
||||
})
|
||||
->addColumn('start_time', function ($response) {
|
||||
return \Carbon\Carbon::parse($response->start_date)->format('h:i A');
|
||||
})
|
||||
->addColumn('end_date', function ($response) {
|
||||
return \Carbon\Carbon::parse($response->end_date)->format('d-m-Y');
|
||||
})
|
||||
->addColumn('end_time', function ($response) {
|
||||
return \Carbon\Carbon::parse($response->end_date)->format('h:i A');
|
||||
})
|
||||
->addColumn('action', function ($response) {
|
||||
$viewButton = $response->proof
|
||||
? '<a href="' . asset('storage/' . $response->proof) . '" target="_blank" class="btn btn-sm btn-primary">View</a>'
|
||||
: 'No Proof';
|
||||
return $viewButton;
|
||||
})
|
||||
->rawColumns(['action'])
|
||||
->make(true);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -20,9 +20,14 @@ class FacultyController extends Controller
|
||||
return view('faculty.activities-attended-form');
|
||||
}
|
||||
|
||||
public function viewActivitiesAttendedResponses()
|
||||
{
|
||||
return view('activities-attended.index');
|
||||
}
|
||||
|
||||
public function ActivitiesAttendedFormResponse(Request $request)
|
||||
{
|
||||
// dd($request->all());
|
||||
// dd($request->all(),"hello");
|
||||
try {
|
||||
// Validate the request data
|
||||
$validated = $request->validate([
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<form action="{{ route('admin.ActivitiesAttended.update', $response->id) }}" method="POST" enctype="multipart/form-data">
|
||||
<form action="{{ request()->is('admin/*') ? route('admin.ActivitiesAttended.update', $response->id) : (request()->is('coordinator/*') ? route('coordinator.ActivitiesAttended.update', $response->id) : route('faculty.ActivitiesAttended.update', $response->id)) }}" method="POST" enctype="multipart/form-data">
|
||||
@csrf
|
||||
@method('PUT')
|
||||
|
||||
@@ -145,7 +145,8 @@
|
||||
</div>
|
||||
|
||||
<div class="mt-6 flex items-center justify-end">
|
||||
<a href="{{ route('admin.ActivitiesAttendedResponses') }}" class="bg-gray-200 py-2 px-4 border border-gray-300 rounded-md shadow-sm text-sm font-medium text-gray-700 hover:bg-gray-300 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-gray-500 mr-3">
|
||||
|
||||
<a href="{{ request()->is('admin/*') ? route('admin.ActivitiesAttendedResponses') : (request()->is('coordinator/*') ? route('coordinator.ActivitiesAttendedResponses') : route('faculty.ActivitiesAttendedResponses')) }}" class="bg-gray-200 py-2 px-4 border border-gray-300 rounded-md shadow-sm text-sm font-medium text-gray-700 hover:bg-gray-300 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-gray-500 mr-3">
|
||||
Cancel
|
||||
</a>
|
||||
<button type="submit" class="inline-flex justify-center py-2 px-4 border border-transparent text-sm font-medium rounded-md text-white bg-black">
|
||||
@@ -235,13 +235,15 @@
|
||||
// order: [[4, 'asc']],
|
||||
});
|
||||
};
|
||||
// Add this after your datatable initialization
|
||||
// Replace this event handler in your script
|
||||
$('#responses-table').on('click', '.delete-btn', function() {
|
||||
console.log("hsjda");
|
||||
if (confirm('Are you sure you want to delete this record?')) {
|
||||
const id = $(this).data('id');
|
||||
const url = $(this).data('url'); // Use the data-url attribute instead of hardcoded path
|
||||
|
||||
$.ajax({
|
||||
url: `/admin/activities-attended/${id}`,
|
||||
url: url, // This will use the correct URL based on user role
|
||||
type: 'DELETE',
|
||||
data: {
|
||||
"_token": "{{ csrf_token() }}"
|
||||
@@ -272,7 +274,18 @@
|
||||
};
|
||||
}
|
||||
|
||||
initAjaxRoute("{{ route('admin.ActivitiesAttendedResponses.data') }}");
|
||||
// Add this before initAjaxRoute call at the end of your script
|
||||
const userRole = "{{ auth()->user()->role->name }}";
|
||||
let dataRoute = "{{ route('admin.ActivitiesAttendedResponses.data') }}";
|
||||
|
||||
if (userRole === 'Coordinator') {
|
||||
dataRoute = "{{ route('coordinator.ActivitiesAttendedResponses.data') }}";
|
||||
}
|
||||
if (userRole === 'Faculty') {
|
||||
dataRoute = "{{ route('faculty.ActivitiesAttendedResponses.data') }}";
|
||||
}
|
||||
|
||||
initAjaxRoute(dataRoute);
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<?php
|
||||
|
||||
use App\Http\Controllers\ActivitiesAttendedController;
|
||||
use App\Http\Controllers\ProfileController;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
use App\Http\Controllers\RoleController;
|
||||
@@ -36,25 +37,29 @@ Route::middleware('auth')->group(function () {
|
||||
Route::delete('/profile', [ProfileController::class, 'destroy'])->name('profile.destroy');
|
||||
});
|
||||
|
||||
Route::delete('/activities-attended/{id}', [ActivitiesAttendedController::class, 'destroy'])->name('activitiesAttended.destroy');
|
||||
// Admin routes
|
||||
Route::middleware(['auth', CheckRole::class . ':Admin'])->group(function () {
|
||||
Route::get('/admin', [AdminController::class, 'index'])->name('admin.dashboard');
|
||||
Route::get('/admin/ActivitiesAttendedResponses', [AdminController::class, 'viewActivitiesAttendedResponses'])->name('admin.ActivitiesAttendedResponses');
|
||||
Route::get('/admin/ActivitiesAttendedResponses/data', [AdminController::class, 'getActivitiesAttendedResponses'])->name('admin.ActivitiesAttendedResponses.data');
|
||||
Route::get('/admin/ActivitiesAttendedResponses/data', [ActivitiesAttendedController::class, 'getActivitiesAttendedResponses'])->name('admin.ActivitiesAttendedResponses.data');
|
||||
// In your routes file (web.php)
|
||||
// Route::get('/admin/activities-attended/{id}/edit', 'Admin\ActivitiesAttendedController@edit')->name('admin.ActivitiesAttended.edit');
|
||||
// Route::put('/admin/activities-attended/{id}', 'Admin\ActivitiesAttendedController@update')->name('admin.ActivitiesAttended.update');
|
||||
// Route::delete('/admin/activities-attended/{id}', 'Admin\ActivitiesAttendedController@destroy')->name('admin.ActivitiesAttended.destroy');
|
||||
Route::get('/admin/activities-attended/{id}/edit', [AdminController::class, 'edit'])->name('admin.ActivitiesAttended.edit');
|
||||
Route::put('/admin/activities-attended/{id}', [AdminController::class, 'update'])->name('admin.ActivitiesAttended.update');
|
||||
Route::delete('/admin/activities-attended/{id}', [AdminController::class, 'destroy'])->name('admin.ActivitiesAttended.destroy');
|
||||
Route::get('/admin/activities-attended/{id}/edit', [ActivitiesAttendedController::class, 'edit'])->name('admin.ActivitiesAttended.edit');
|
||||
Route::put('/admin/activities-attended/{id}', [ActivitiesAttendedController::class, 'update'])->name('admin.ActivitiesAttended.update');
|
||||
Route::delete('/admin/activities-attended/{id}', [ActivitiesAttendedController::class, 'destroy'])->name('admin.ActivitiesAttended.destroy');
|
||||
});
|
||||
|
||||
// Coordinator routes
|
||||
Route::middleware(['auth', CheckRole::class . ':Coordinator'])->group(function () {
|
||||
Route::get('/coordinator', [CoordinatorController::class, 'index'])->name('coordinator.dashboard');
|
||||
Route::get('/coordinator/ActivitiesAttendedResponses', [CoordinatorController::class, 'viewActivitiesAttendedResponses'])->name('coordinator.ActivitiesAttendedResponses');
|
||||
Route::get('/coordinator/ActivitiesAttendedResponses/data', [CoordinatorController::class, 'getActivitiesAttendedResponses'])->name('coordinator.ActivitiesAttendedResponses.data');
|
||||
Route::get('/coordinator/ActivitiesAttendedResponses/data', [ActivitiesAttendedController::class, 'getActivitiesAttendedResponses'])->name('coordinator.ActivitiesAttendedResponses.data');
|
||||
Route::get('/coordinator/activities-attended/{id}/edit', [ActivitiesAttendedController::class, 'edit'])->name('coordinator.ActivitiesAttended.edit');
|
||||
Route::put('/coordinator/activities-attended/{id}', [ActivitiesAttendedController::class, 'update'])->name('coordinator.ActivitiesAttended.update');
|
||||
Route::delete('/coordinator/activities-attended/{id}', [ActivitiesAttendedController::class, 'destroy'])->name('coordinator.ActivitiesAttended.destroy');
|
||||
});
|
||||
|
||||
|
||||
@@ -63,6 +68,10 @@ Route::middleware(['auth', CheckRole::class . ':Faculty'])->group(function () {
|
||||
Route::get('/faculty', [FacultyController::class, 'index'])->name('faculty.dashboard');
|
||||
Route::get('/faculty/ActivitiesAttendedForm', [FacultyController::class, 'ActivitiesAttendedForm'])->name('faculty.ActivitiesAttendedForm');
|
||||
Route::post('/faculty/ActivitiesAttendedFormResponse', [FacultyController::class, 'ActivitiesAttendedFormResponse'])->name('faculty.ActivitiesAttendedFormResponse');
|
||||
Route::get('/faculty/ActivitiesAttendedResponses', [FacultyController::class, 'viewActivitiesAttendedResponses'])->name('faculty.ActivitiesAttendedResponses');
|
||||
Route::get('/faculty/ActivitiesAttendedResponses/data', [ActivitiesAttendedController::class, 'getActivitiesAttendedResponses'])->name('faculty.ActivitiesAttendedResponses.data');
|
||||
Route::get('/faculty/activities-attended/{id}/edit', [ActivitiesAttendedController::class, 'edit'])->name('faculty.ActivitiesAttended.edit');
|
||||
Route::put('/faculty/activities-attended/{id}', [ActivitiesAttendedController::class, 'update'])->name('faculty.ActivitiesAttended.update');
|
||||
});
|
||||
|
||||
// API Resources
|
||||
|
||||
Reference in New Issue
Block a user