Command Line Interface
If you have console access to the Colabmacs instance you can run some commands from the Command line
Build Info
Returns information about the current branch being executed. In order to run this command the application must be running from a git enabled directory and not be detached from the master repo.
php artisan build:info
Will return something like:
Running [master] <b9008ed51151cb247d4eb4c6a705e3ee0a2e843c> Tue, Jun 7, 2022 9:47 AM
Create Tenant
Create and persist a new tenant to the database
php artisan tenant:create [options] [--] <name> <landlord>
Arguments:
name The name of the tenant
landlord The name or ID of the Landlord who the tenant belongs to
Options:
-D, --domain[=DOMAIN] The tenant subdomain
-d, --description[=DESCRIPTION] An additional tenant description
Create Tenant Database
Create and new tenant database if one does not exist. You can use either a tenant ID or name. Optionally add -m to migrate the database.
php artisan tenant:database:create [options]
Options:
-t, --tenants[=TENANTS] The name or ID of the tenant(s). Leave blank for all. (multiple values allowed)
-m, --migrate Run migration if set
Create Tenant Filesystem
Create the filesystem for the one or more tenants. This creates a storage disk directory, public directory and symlink.
php srtisan tenant:filesystem:create [options]
Options:
-t, --tenants[=TENANTS] The name or ID of the tenant(s). Leave blank for all. (multiple values allowed)
Create Holiday Schedule
Create (or update) a schedule of holiday events based on available data from https://canada-holidays.ca. Adding a province qualifier will create only a schedule for that province. Defaults to all provinces (one schedule per province).
php artisan schedule:create:holiday [options]
Options:
-y, --year[=YEAR] The year to create events for.
-p, --province[=PROVINCE] The two letter abbreviation of the province to generate a schedule for.
-s, --source[=SOURCE] The data source to use. Must provide data according to spec found at https://app.swaggerhub.com/apis/pcraig3/canada-holidays/1.3.1.
-t, --tenant[=TENANT] The id or name of the tenant to create the schedule for. Defaults to all tenants.
Destroy Tenant Filesystem
Destroy the filesystem for the specified tenant. This removes the storage disk directory and public directory
php artisan tenant:filesystem:destroy <tenant>
Arguments:
tenant The name or ID of the tenant
Drop Tenant Database
Drop a database if it exists for the specified tenant. You can use either a tenant ID or name.
php artisan tenant:database:drop <tenant>
Arguments:
tenant The name or ID of the tenant
Expire Training Records
Note
Must be run in a Tenant context
Running the following command will expire any trainings that have lapsed. This command is run automatically by the scheduler twice daily by default.
php artisan trainings:expire
Generate Charges
Generate charges for all usage events. You can use either a tenant ID or name. Optionally add -d to specify an inclusive end date.
php artisan charges:create [options]
Options:
-t, --tenants[=TENANTS] The name or ID of the tenant(s). Leave blank for all. (multiple values allowed)
-d, --date Optional end date (inclusive)
Import Data
Import a legacy database into a tenant application. The command expects the legacy database to live on the same server as the target Tenant database. The interval
argument accepts a carbon parsable string.
php artisan legacy:import [options] [--] <tenant> <interval>
Arguments:
tenant The name or ID of the tenant
interval The time interval to import (from now)
Options:
-D, --database[=DATABASE] The name of the legacy database to use. Defaults to config value.
-f, --fresh run fresh migrations before importing data.
-s, --scaffold Scaffold basic application defaults
Link Tenant Filesystem
Create public symlinks to storage directories for one or more tenants
php artisan tenant:filesystem:link [options]
Options:
-t, --tenants[=TENANTS] The name or ID of the tenant(s). Leave blank for all. (multiple values allowed)
Process Missed Events
Note
Must be run in a Tenant context
Manually update the state of events in the system that have been missed. This command is run automatically by the scheduler every 15 minutes by default. You may specify a carbon parsable string to override the default grace
period of 15 minutes.
php artisan events:miss [options]
Options:
--grace[=GRACE] how much time must elapse before the event is considered missed
Warn Training Records Nearing Expiration
Note
Must be run in a Tenant context
Notify users whose training is nearing expiration. This command is run automatically by the scheduler daily. You may specify a carbon parsable string to override the default notice
period of 30 days.
php artisan trainings:warn [options]
Options:
--notice[=NOTICE] the amount of notice to provide. [default: "30 days"]