Menu

## AdmissionController extends Controller
in package
uses AdmissionUser, LogActivity, Common

AdmissionController.php : 31

### Table of Contents

#### Methods

create() : Response
  Show the form for creating a new resource.
CreateStudent() : User
  Create a new student with profile, academics, and optional fee payment.
CreateStudentFather() : User
  Create or link a father profile to a student.
CreateStudentMother() : User
  Create or link a mother profile to a student.
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).
list() : mixed
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.
store() : Response
  Store a newly created resource in storage.
unlinkFilePath() : bool
  Delete a file from the S3 disk.
uploadFile() : string
  Upload a file to storage and return its path.
validationAcademicDetail() : Response
  Store a newly created resource in storage.
validationParentDetail() : Response
  Store a newly created resource in storage.
validationPersonalDetail() : Response
  Store a newly created resource in storage.
validationStandard() : Response
  Store a newly created resource in storage.
validationStudentDetail() : Response
  Store a newly created resource in storage.

### Methods

#### create()

AdmissionController.php : 59

Show the form for creating a new resource.

`public create(mixed $slug) : Response`

##### Parameters

$slug : mixed

##### Return values

Response

#### CreateStudent()

AdmissionUser.php : 38

Create a new student with profile, academics, and optional fee payment.

`public CreateStudent(object $data, int $usergroup_id, int $standardLink_id, string $path, mixed $fee, User $admin) : User`

##### Parameters

$data : object

  Request payload containing student details

$usergroup_id : int

  User group ID for the student

$standardLink_id : int

  Standard link to associate

$path : string

  Avatar path if provided

$fee : mixed

  Fee model or data required for payment

$admin : User

  Admin performing the operation

##### Return values

User —

Newly created student user

#### CreateStudentFather()

AdmissionUser.php : 225

Create or link a father profile to a student.

`public CreateStudentFather(int|null $student_id, object $data, int $usergroup_id) : User`

##### Parameters

$student_id : int|null

  Student identifier to link (optional)

$data : object

  Request payload containing father details

$usergroup_id : int

  User group ID for parent role

##### Return values

User —

Newly created father user

#### CreateStudentMother()

AdmissionUser.php : 310

Create or link a mother profile to a student.

`public CreateStudentMother(int|null $student_id, object $data, int $usergroup_id) : User`

##### Parameters

$student_id : int|null

  Student identifier to link (optional)

$data : object

  Request payload containing mother details

$usergroup_id : int

  User group ID for parent role

##### Return values

User —

Newly created mother user

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

#### list()

AdmissionController.php : 37
`public list(Request $request, mixed $slug) : mixed`

##### Parameters

$request : Request
$slug : mixed

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

#### store()

AdmissionController.php : 135

Store a newly created resource in storage.

`public store(Request $request, mixed $slug) : Response`

##### Parameters

$request : Request
$slug : mixed

##### Return values

Response

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

#### validationAcademicDetail()

AdmissionController.php : 101

Store a newly created resource in storage.

`public validationAcademicDetail(Request $request) : Response`

##### Parameters

$request : Request

##### Return values

Response

#### validationParentDetail()

AdmissionController.php : 112

Store a newly created resource in storage.

`public validationParentDetail(Request $request) : Response`

##### Parameters

$request : Request

##### Return values

Response

#### validationPersonalDetail()

AdmissionController.php : 124

Store a newly created resource in storage.

`public validationPersonalDetail(Request $request) : Response`

##### Parameters

$request : Request

##### Return values

Response

#### validationStandard()

AdmissionController.php : 79

Store a newly created resource in storage.

`public validationStandard(Request $request) : Response`

##### Parameters

$request : Request

##### Return values

Response

#### validationStudentDetail()

AdmissionController.php : 90

Store a newly created resource in storage.

`public validationStudentDetail(Request $request) : Response`

##### Parameters

$request : Request

##### Return values

Response

## Search results