Menu

## TeacherImportExportController extends Controller
in package
uses MemberProcess, LogActivity, Common

TeacherImportExportController.php : 21

### Table of Contents

#### Methods

AlumniFilter() : AnonymousResourceCollection
  Filter alumni users by name alphabet and batch.
AlumniProfileFilter() : AnonymousResourceCollection
  Filter alumni profiles excluding the current user.
doActivityLog() : mixed
  Fetches the activities of the logged in users.
downloadFormat() : mixed
eventImagePath() : string|null
  Resolve default event image path by category.
export() : Response
  Display a listing of the resource.
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.
import() : Collection
importCreate() : Response
  Display a listing of the resource.
is_admin() : bool
  Determine if a user ID belongs to an admin role (usergroup_id == 3).
LibraryMemberFilter() : AnonymousResourceCollection
  Filter library member records (students) using profile and library data.
LibraryStaffFilter() : AnonymousResourceCollection
  Filter library staff by profile and library card/lending data.
LibraryTeacherFilter() : AnonymousResourceCollection
  Filter library teachers by profile and library card/lending data.
MemberFilter() : AnonymousResourceCollection
  Filter members (students) by role, status, and optional profile criteria.
ParentFilter() : AnonymousResourceCollection
  Filter parents with active children and optional profile attributes.
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.
StaffFilter() : AnonymousResourceCollection
  Filter non-teaching staff users by group and optional attributes.
teacherexport() : mixed
teacherexports() : mixed
TeacherFilter() : AnonymousResourceCollection
  Filter teacher users by role and profile attributes.
unlinkFilePath() : bool
  Delete a file from the S3 disk.
uploadFile() : string
  Upload a file to storage and return its path.

### Methods

#### AlumniFilter()

MemberProcess.php : 385

Filter alumni users by name alphabet and batch.

`public AlumniFilter(Request $request, int $school_id, int $usergroup_id) : AnonymousResourceCollection`

##### Parameters

$request : Request

  Incoming request with filter params

$school_id : int

  School identifier

$usergroup_id : int

  Alumni role id

##### Return values

AnonymousResourceCollection

#### AlumniProfileFilter()

MemberProcess.php : 425

Filter alumni profiles excluding the current user.

`public AlumniProfileFilter(Request $request, int $school_id, int $usergroup_id, int $user_id) : AnonymousResourceCollection`

##### Parameters

$request : Request

  Incoming request with filter params

$school_id : int

  School identifier

$usergroup_id : int

  Alumni role id

$user_id : int

  Current user id to exclude

##### Return values

AnonymousResourceCollection

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

#### downloadFormat()

TeacherImportExportController.php : 132
`public downloadFormat(Request $request) : mixed`

##### Parameters

$request : Request

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

#### export()

TeacherImportExportController.php : 31

Display a listing of the resource.

`public export(Request $request) : Response`

##### Parameters

$request : Request

##### Return values

Response

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

#### import()

TeacherImportExportController.php : 94
`public import(ImportMemberRequest $request) : Collection`

##### Parameters

$request : ImportMemberRequest

##### Return values

Collection

#### importCreate()

TeacherImportExportController.php : 85

Display a listing of the resource.

`public importCreate() : 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

#### LibraryMemberFilter()

MemberProcess.php : 465

Filter library member records (students) using profile and library data.

`public LibraryMemberFilter(Request $request, int $school_id, int $usergroup_id, string $status) : AnonymousResourceCollection`

##### Parameters

$request : Request

  Incoming request with filter params

$school_id : int

  School identifier

$usergroup_id : int

  User group to filter by

$status : string

  Default status filter

##### Return values

AnonymousResourceCollection

#### LibraryStaffFilter()

MemberProcess.php : 631

Filter library staff by profile and library card/lending data.

`public LibraryStaffFilter(Request $request, int $school_id, array<string|int, mixed> $usergroup_id) : AnonymousResourceCollection`

##### Parameters

$request : Request

  Incoming request with filter params

$school_id : int

  School identifier

$usergroup_id : array<string|int, mixed>

  Staff role ids

##### Return values

AnonymousResourceCollection

#### LibraryTeacherFilter()

MemberProcess.php : 557

Filter library teachers by profile and library card/lending data.

`public LibraryTeacherFilter(Request $request, int $school_id, int $usergroup_id) : AnonymousResourceCollection`

##### Parameters

$request : Request

  Incoming request with filter params

$school_id : int

  School identifier

$usergroup_id : int

  Teacher role id

##### Return values

AnonymousResourceCollection

#### MemberFilter()

MemberProcess.php : 36

Filter members (students) by role, status, and optional profile criteria.

`public MemberFilter(Request $request, int $school_id, int $usergroup_id, string $status) : AnonymousResourceCollection`

##### Parameters

$request : Request

  Incoming request with filter params

$school_id : int

  School identifier

$usergroup_id : int

  User group to filter by

$status : string

  Default status filter

##### Return values

AnonymousResourceCollection

#### ParentFilter()

MemberProcess.php : 310

Filter parents with active children and optional profile attributes.

`public ParentFilter(Request $request, int $school_id, int $usergroup_id) : AnonymousResourceCollection`

##### Parameters

$request : Request

  Incoming request with filter params

$school_id : int

  School identifier

$usergroup_id : int

  Parent role id

##### Return values

AnonymousResourceCollection

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

#### StaffFilter()

MemberProcess.php : 224

Filter non-teaching staff users by group and optional attributes.

`public StaffFilter(Request $request, int $school_id, array<string|int, mixed> $usergroup_id) : AnonymousResourceCollection`

##### Parameters

$request : Request

  Incoming request with filter params

$school_id : int

  School identifier

$usergroup_id : array<string|int, mixed>

  One or more staff role ids

##### Return values

AnonymousResourceCollection

#### teacherexport()

TeacherImportExportController.php : 176
`public teacherexport(Request $request) : mixed`

##### Parameters

$request : Request

#### teacherexports()

TeacherImportExportController.php : 189
`public teacherexports(Request $request) : mixed`

##### Parameters

$request : Request

#### TeacherFilter()

MemberProcess.php : 138

Filter teacher users by role and profile attributes.

`public TeacherFilter(Request $request, int $school_id, int $usergroup_id) : AnonymousResourceCollection`

##### Parameters

$request : Request

  Incoming request with filter params

$school_id : int

  School identifier

$usergroup_id : int

  Teacher role id

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