Overview
The Subject model provides simple CRUD operations for managing academic subjects. File:app/models/Subject.php
Methods
all
Retrieves all subjects from the database. SQL Query:Returns array of all subject records
create
Creates a new subject.The name of the subject to create
No return value (throws exception on failure)
delete
Deletes a subject by ID.Subject ID to delete
No return value (throws exception on failure)