Skip to content

Installation ​

Get started with jengo/notifications in your CodeIgniter 4 application.


1. Install via Composer ​

Add jengo/notifications to your application dependencies:

bash
composer require jengo/notifications

2. Run the Jengo Installer ​

Run the automated installer to publish configuration, register helpers, execute database migrations, and verify subsystem health:

bash
php spark jengo:install notifications

This command automatically:

  1. Publishes Configuration: Creates app/Config/Notifications.php extending BaseNotifications.
  2. Registers Autoload Helper: Adds 'notification' to $helpers in app/Config/Autoload.php so global functions notify() and notification() are always available.
  3. Executes Database Migrations: Runs php spark migrate -n \Jengo\Notifications to scaffold the notifications table.
  4. Verifies Readiness: Confirms database connectivity, table schema availability, and cURL extension readiness.

Manual Installation (Alternative) ​

If you prefer performing each step manually:

1. Create Migration File ​

bash
php spark notifications:table

2. Run Migrations ​

bash
php spark migrate

Or run the package migrations directly:

bash
php spark migrate -n \Jengo\Notifications

3. Publish Configuration ​

Copy vendor/jengo/notifications/src/Config/Notifications.php to app/Config/Notifications.php and adjust the namespace to Config.

Released under the MIT License.