Menu

## StudentDetailsController extends Controller
in package
uses LogActivity, Common

StudentDetailsController.php : 53

Class StudentDetailsController

Handles student-related detailed views such as profile, relations, attendance, marks, fees, medical history, activities, and reports.

### Table of Contents

#### Methods

addMedicalHistory() : array<string|int, mixed>|null
  Store or update student medical history.
compareMarks() : View
  Compare marks between two latest exams for a student.
create() : RedirectResponse|null
  Enable bus pass for selected students.
createMedicalHistory() : View
  Display create medical history form.
doActivityLog() : mixed
  Fetches the activities of the logged in users.
eventImagePath() : string|null
  Resolve default event image path by category.
fileUpload() : string
  Write raw file contents to storage.
getFilePath() : string
  Get the public URL for a stored file.
getFilePathforDownload() : string
  Get file contents for download optionally from a specific disk.
getRequestIP() : string
  Retrieve the client IP address considering proxies.
is_admin() : bool
  Determine if a user ID belongs to an admin role (usergroup_id == 3).
marksGraph() : View
  Display student marks graph for all exams.
putContents() : string
  Save plain contents to storage with public visibility.
putContentsByFilename() : string
  Save a file with a specific filename to storage.
romanToInteger() : int|null
  Convert a Roman numeral string to an integer.
show() : View
  Display student profile page with parent details.
showActivity() : mixed
  Show activity logs where student is subject.
showActivityLog() : mixed
  Show activity logs where student is causer.
showAllMark() : mixed
  Display all exam marks of a student.
showAttendance() : AnonymousResourceCollection
  Show student attendance records.
showBookLent() : AnonymousResourceCollection
  Display books lent to a student.
showbus() : View
  Display bus pass details for a student.
showDetails() : AnonymousResourceCollection
  Show student basic details.
showDisciplines() : AnonymousResourceCollection
  Show student discipline records.
showFees() : mixed
  Show student fee details.
showmark() : mixed
  Display student marks for a specific exam.
showMedicalHistory() : array<string|int, mixed>
  Show student medical history.
showprint_buspass() : StreamedResponse
  Print student bus pass as PDF.
showRelations() : AnonymousResourceCollection
  Show parent relations of a student.
showSiblings() : AnonymousResourceCollection
  Show siblings of a student.
unlinkFilePath() : bool
  Delete a file from the S3 disk.
uploadFile() : string
  Upload a file to storage and return its path.

### Methods

#### addMedicalHistory()

StudentDetailsController.php : 274

Store or update student medical history.

`public addMedicalHistory(MedicalHistoryRequest $request, string $name) : array<string|int, mixed>|null`

##### Parameters

$request : MedicalHistoryRequest
$name : string

##### Return values

array<string|int, mixed>|null

#### compareMarks()

StudentDetailsController.php : 397

Compare marks between two latest exams for a student.

`public compareMarks(string $name) : View`

##### Parameters

$name : string

  Student name

##### Return values

View

#### create()

StudentDetailsController.php : 524

Enable bus pass for selected students.

`public create() : RedirectResponse|null`

##### Return values

RedirectResponse|null

#### createMedicalHistory()

StudentDetailsController.php : 259

Display create medical history form.

`public createMedicalHistory(string $name) : View`

##### Parameters

$name : string

##### Return values

View

#### doActivityLog()

LogActivity.php : 15

Fetches the activities of the logged in users.

`public doActivityLog(string $performed_on, string $caused_by, text $properties, mixed $logname, text $message) : mixed`

##### Parameters

$performed_on : string
$caused_by : string
$properties : text
$logname : mixed
$message : text

#### eventImagePath()

Common.php : 118

Resolve default event image path by category.

`public eventImagePath(string $category, string $image) : string|null`

##### Parameters

$category : string

  Event category slug

$image : string

  Unused parameter kept for compatibility

##### Return values

string|null —

Public URL for the event image or null on failure

#### fileUpload()

Common.php : 71

Write raw file contents to storage.

`public fileUpload(string $folder, string $file) : string`

##### Parameters

$folder : string

  Target path (including filename)

$file : string

  Raw file contents

##### Return values

string —

Storage path of the written file

#### getFilePath()

Common.php : 24

Get the public URL for a stored file.

`public getFilePath(string $file) : string`

##### Parameters

$file : string

  Storage path

##### Return values

string —

Publicly accessible URL or empty string on failure

#### getFilePathforDownload()

Common.php : 253

Get file contents for download optionally from a specific disk.

`public getFilePathforDownload([string $disk = '' ], string $file) : string`

##### Parameters

$disk : string = ''

  Storage disk name

$file : string

  File path

##### Return values

string —

File contents

#### getRequestIP()

Common.php : 93

Retrieve the client IP address considering proxies.

`public getRequestIP() : string`

##### Return values

string —

IP address

#### is_admin()

Common.php : 304

Determine if a user ID belongs to an admin role (usergroup_id == 3).

`public static is_admin(int|string $userid) : bool`

##### Parameters

$userid : int|string

  User identifier

##### Return values

bool —

True if user is admin, false otherwise

#### marksGraph()

StudentDetailsController.php : 449

Display student marks graph for all exams.

`public marksGraph(string $name) : View`

##### Parameters

$name : string

  Student name

##### Return values

View

#### putContents()

Common.php : 157

Save plain contents to storage with public visibility.

`public putContents(string $folder, string $contents) : string`

##### Parameters

$folder : string

  Destination path

$contents : string

  File contents

##### Return values

string —

Storage path of the saved file

#### putContentsByFilename()

Common.php : 182

Save a file with a specific filename to storage.

`public putContentsByFilename(string $folder, UploadedFile $contents, string $filename) : string`

##### Parameters

$folder : string

  Destination folder

$contents : UploadedFile

  File instance

$filename : string

  Target filename

##### Return values

string —

Storage path of the saved file

#### romanToInteger()

Common.php : 205

Convert a Roman numeral string to an integer.

`public romanToInteger(string $roman) : int|null`

##### Parameters

$roman : string

  Roman numeral value

##### Return values

int|null —

Converted integer or null on failure

#### show()

StudentDetailsController.php : 337

Display student profile page with parent details.

`public show(string $name) : View`

##### Parameters

$name : string

  Student name

##### Return values

View

#### showActivity()

StudentDetailsController.php : 115

Show activity logs where student is subject.

`public showActivity(string $name) : mixed`

##### Parameters

$name : string

#### showActivityLog()

StudentDetailsController.php : 139

Show activity logs where student is causer.

`public showActivityLog(string $name) : mixed`

##### Parameters

$name : string

#### showAllMark()

StudentDetailsController.php : 382

Display all exam marks of a student.

`public showAllMark(string $name) : mixed`

##### Parameters

$name : string

  Student name

#### showAttendance()

StudentDetailsController.php : 179

Show student attendance records.

`public showAttendance(string $name) : AnonymousResourceCollection`

##### Parameters

$name : string

##### Return values

AnonymousResourceCollection

#### showBookLent()

StudentDetailsController.php : 321

Display books lent to a student.

`public showBookLent(string $name) : AnonymousResourceCollection`

##### Parameters

$name : string

  Student name

##### Return values

AnonymousResourceCollection

#### showbus()

StudentDetailsController.php : 548

Display bus pass details for a student.

`public showbus(string $name) : View`

##### Parameters

$name : string

  Student name

##### Return values

View

#### showDetails()

StudentDetailsController.php : 65

Show student basic details.

`public showDetails(string $name) : AnonymousResourceCollection`

##### Parameters

$name : string

##### Return values

AnonymousResourceCollection

#### showDisciplines()

StudentDetailsController.php : 163

Show student discipline records.

`public showDisciplines(string $name) : AnonymousResourceCollection`

##### Parameters

$name : string

##### Return values

AnonymousResourceCollection

#### showFees()

StudentDetailsController.php : 222

Show student fee details.

`public showFees(string $name) : mixed`

##### Parameters

$name : string

#### showmark()

StudentDetailsController.php : 367

Display student marks for a specific exam.

`public showmark(string $name) : mixed`

##### Parameters

$name : string

  Student name

#### showMedicalHistory()

StudentDetailsController.php : 195

Show student medical history.

`public showMedicalHistory(string $name) : array<string|int, mixed>`

##### Parameters

$name : string

##### Return values

array<string|int, mixed>

#### showprint_buspass()

StudentDetailsController.php : 565

Print student bus pass as PDF.

`public showprint_buspass(string $name) : StreamedResponse`

##### Parameters

$name : string

  Student name

##### Return values

StreamedResponse

#### showRelations()

StudentDetailsController.php : 81

Show parent relations of a student.

`public showRelations(string $name) : AnonymousResourceCollection`

##### Parameters

$name : string

##### Return values

AnonymousResourceCollection

#### showSiblings()

StudentDetailsController.php : 97

Show siblings of a student.

`public showSiblings(string $name) : AnonymousResourceCollection`

##### Parameters

$name : string

##### Return values

AnonymousResourceCollection

#### unlinkFilePath()

Common.php : 282

Delete a file from the S3 disk.

`public unlinkFilePath(string $file) : bool`

##### Parameters

$file : string

  File path on S3

##### Return values

bool —

True after attempting deletion

#### uploadFile()

Common.php : 47

Upload a file to storage and return its path.

`public uploadFile(string $folder, UploadedFile $file) : string`

##### Parameters

$folder : string

  Target folder path

$file : UploadedFile

  File to upload

##### Return values

string —

Storage path for the uploaded file

## Search results