Chore: small fixes for the presentation
This commit is contained in:
@@ -57,12 +57,13 @@ class ActivitiesAttendedController extends Controller
|
||||
// Extract year from start_date
|
||||
$year = date('Y', strtotime($validated['start_date']));
|
||||
$username = $response->user->name;
|
||||
$userId = $response->user->id;
|
||||
|
||||
$originalName = $request->file('proof')->getClientOriginalName();
|
||||
$fileName = $username . '_' . $originalName;
|
||||
|
||||
// Create path structure: year/faculty_name
|
||||
$folderPath = 'proofs/' . $year . '/' . $username;
|
||||
$folderPath = 'proofs/' . $year . '/' . $userId . '_' . $username . '/Activities-Attended';
|
||||
|
||||
// Store file in the specified path
|
||||
$proofPath = $request->file('proof')->storeAs($folderPath, $fileName, 'public');
|
||||
|
||||
Reference in New Issue
Block a user