Chore: small fixes for the presentation

This commit is contained in:
Sallu9007
2025-05-14 14:26:21 +05:30
parent 8f2ad606ca
commit e0010a6929
6 changed files with 21 additions and 12 deletions

View File

@@ -55,12 +55,13 @@ class ActivitiesOrganisedController 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-Organised';
// Store file in the specified path
$proofPath = $request->file('proof')->storeAs($folderPath, $fileName, 'public');