Menu

## CalendarService
in package

CalendarService.php : 20

Class CalendarService

Handles calendar event operations such as creating, updating, fetching, and deleting events.

### Table of Contents

#### Methods

createEvent() : Events
  Create a new calendar event and trigger notifications.
deleteEvent() : Events
  Delete an event by ID.
events() : Collection
  Get all events for a given school and academic year.
eventscount() : Collection
  Get countable events excluding holidays.
getEvent() : Events|null
  Get a single event by ID and school.
test() : string
  Test method to verify service binding.
updateEvent() : Events
  Update an existing event and trigger notifications.

### Methods

#### createEvent()

CalendarService.php : 74

Create a new calendar event and trigger notifications.

`public createEvent(int $school_id, int $academic_year, array<string|int, mixed>|Request $request) : Events`

##### Parameters

$school_id : int
$academic_year : int
$request : array<string|int, mixed>|Request

##### Return values

Events

#### deleteEvent()

CalendarService.php : 188

Delete an event by ID.

`public deleteEvent(int $id) : Events`

##### Parameters

$id : int

##### Return values

Events

#### events()

CalendarService.php : 38

Get all events for a given school and academic year.

`public events(int $school_id, int $academic_year) : Collection`

##### Parameters

$school_id : int
$academic_year : int

##### Return values

Collection

#### eventscount()

CalendarService.php : 55

Get countable events excluding holidays.

`public eventscount(int $school_id, int $academic_year) : Collection`

##### Parameters

$school_id : int
$academic_year : int

##### Return values

Collection

#### getEvent()

CalendarService.php : 115

Get a single event by ID and school.

`public getEvent(int $events_id, int $school_id) : Events|null`

##### Parameters

$events_id : int
$school_id : int

##### Return values

Events|null

#### test()

CalendarService.php : 27

Test method to verify service binding.

`public test() : string`

##### Return values

string

#### updateEvent()

CalendarService.php : 134

Update an existing event and trigger notifications.

`public updateEvent(int $event_id, int $school_id, int $academic_year, Request $request) : Events`

##### Parameters

$event_id : int
$school_id : int
$academic_year : int
$request : Request

##### Return values

Events

## Search results