Menu

## DashboardController extends Controller
in package
uses LogActivity, Dashboard, Common

DashboardController.php : 35

Accountant dashboard controller.

Provides endpoints used by the accountant dashboard (fees, tasks, reminders, etc.).

### Table of Contents

#### Methods

accountantDashboard() : array<string|int, mixed>
  Build dashboard metrics for accountant users.
adminDashboard() : array<string|int, mixed>
  Build data required for admin dashboard metrics and widgets.
doActivityLog() : mixed
  Fetches the activities of the logged in users.
eventImagePath() : string|null
  Resolve default event image path by category.
feeslist() : AnonymousResourceCollection}
  Return unpaid fees list and count for a specific fee group.
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.
index() : Response
  Display a listing of the resource.
is_admin() : bool
  Determine if a user ID belongs to an admin role (usergroup_id == 3).
librarianDashboard() : array<string|int, mixed>
  Build dashboard metrics for librarian users.
list() : AnonymousResourceCollection
  Return a collection of tasks for the authenticated accountant filtered by flag.
listCount() : mixed
  Return task counts grouped by flag for the authenticated accountant.
putContents() : string
  Save plain contents to storage with public visibility.
putContentsByFilename() : string
  Save a file with a specific filename to storage.
receptionDashboard() : array<string|int, mixed>
  Build dashboard metrics for receptionist users.
romanToInteger() : int|null
  Convert a Roman numeral string to an integer.
sendReminder() : Response
  Store a newly created resource in storage.
show() : View
  Show the unpaid fees view for a given fee id.
showStructuralList() : Response
  Display a listing of the resource.
structuralList() : Response
  Display a listing of the resource.
studentDashboard() : array<string|int, mixed>
  Build data required for student dashboard including exams, marks, and attendance.
teacherDashboard() : array<string|int, mixed>
  Build data required for teacher dashboard including timetable, notices, and exams.
unlinkFilePath() : bool
  Delete a file from the S3 disk.
unpaidList() : Response
  Display a listing of the resource.
uploadFile() : string
  Upload a file to storage and return its path.

### Methods

#### accountantDashboard()

Dashboard.php : 414

Build dashboard metrics for accountant users.

`public accountantDashboard(int $school_id, int $accountant_id) : array<string|int, mixed>`

##### Parameters

$school_id : int

  School identifier

$accountant_id : int

  Accountant user identifier

##### Return values

array<string|int, mixed> —

Accountant dashboard data

#### adminDashboard()

Dashboard.php : 46

Build data required for admin dashboard metrics and widgets.

`public adminDashboard(int $school_id, int $admin_id) : array<string|int, mixed>`

##### Parameters

$school_id : int

  School identifier

$admin_id : int

  Admin user identifier

##### Return values

array<string|int, mixed> —

Aggregated dashboard data

#### 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

#### feeslist()

DashboardController.php : 242

Return unpaid fees list and count for a specific fee group.

`public feeslist(int $fee_id) : AnonymousResourceCollection}`

##### Parameters

$fee_id : int

##### Return values

AnonymousResourceCollection}

#### 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

#### index()

DashboardController.php : 46

Display a listing of the resource.

`public index() : Response`

##### Return values

Response

#### 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

#### librarianDashboard()

Dashboard.php : 369

Build dashboard metrics for librarian users.

`public librarianDashboard(int $school_id, int $librarian_id) : array<string|int, mixed>`

##### Parameters

$school_id : int

  School identifier

$librarian_id : int

  Librarian user identifier

##### Return values

array<string|int, mixed> —

Librarian dashboard data

#### list()

DashboardController.php : 63

Return a collection of tasks for the authenticated accountant filtered by flag.

`public list(Request $request, int|string $task_flag) : AnonymousResourceCollection`

##### Parameters

$request : Request
$task_flag : int|string

##### Return values

AnonymousResourceCollection

#### listCount()

DashboardController.php : 84

Return task counts grouped by flag for the authenticated accountant.

`public listCount() : mixed`

##### Tags

@return

  array|\Illuminate\Support\Collection

#### 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

#### receptionDashboard()

Dashboard.php : 333

Build dashboard metrics for receptionist users.

`public receptionDashboard(int $school_id, int $receptionist_id) : array<string|int, mixed>`

##### Parameters

$school_id : int

  School identifier

$receptionist_id : int

  Receptionist user identifier

##### Return values

array<string|int, mixed> —

Reception dashboard data

#### 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

#### sendReminder()

DashboardController.php : 272

Store a newly created resource in storage.

`public sendReminder(Request $request, mixed $fee_id) : Response`

##### Parameters

$request : Request
$fee_id : mixed

##### Return values

Response

#### show()

DashboardController.php : 228

Show the unpaid fees view for a given fee id.

`public show(int $fee_id) : View`

##### Parameters

$fee_id : int

##### Return values

View

#### showStructuralList()

DashboardController.php : 128

Display a listing of the resource.

`public showStructuralList(Request $request) : Response`

##### Parameters

$request : Request

##### Return values

Response

#### structuralList()

DashboardController.php : 102

Display a listing of the resource.

`public structuralList() : Response`

##### Return values

Response

#### studentDashboard()

Dashboard.php : 195

Build data required for student dashboard including exams, marks, and attendance.

`public studentDashboard(int $school_id, User $user_id, int $standardLink_id, mixed $subject, mixed $exam, mixed $mark, mixed $exam_date) : array<string|int, mixed>`

##### Parameters

$school_id : int

  School identifier

$user_id : User

  Student user model (expects ->id)

$standardLink_id : int

  Standard link identifier

$subject : mixed

  Subject filter (nullable)

$exam : mixed

  Exam filter (nullable)

$mark : mixed

  Mark filter (nullable)

$exam_date : mixed

  Exam date filter (nullable)

##### Return values

array<string|int, mixed> —

Student dashboard data

#### teacherDashboard()

Dashboard.php : 266

Build data required for teacher dashboard including timetable, notices, and exams.

`public teacherDashboard(int $school_id, int $teacher_id) : array<string|int, mixed>`

##### Parameters

$school_id : int

  School identifier

$teacher_id : int

  Teacher user identifier

##### Return values

array<string|int, mixed> —

Teacher dashboard data

#### 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

#### unpaidList()

DashboardController.php : 165

Display a listing of the resource.

`public unpaidList(mixed $status) : Response`

##### Parameters

$status : mixed

##### Return values

Response

#### 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