IEE Edu ships three custom Artisan commands that handle platform administration tasks not covered by the standard Laravel toolset.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/RigbySawGame/ieeEdu_Wen/llms.txt
Use this file to discover all available pages before exploring further.
iie:make-admin provisions administrator accounts safely from the CLI, while subscriptions:sync-expired and subscription:sync keep course access flags in sync with the state of each user’s subscription. All three commands are located under app/Console/Commands/.
iie:make-admin
Creates or updates a user record withrole=admin and status=activo. Because it uses updateOrCreate, running it against an existing email is safe — it will simply update the name, password, and role rather than creating a duplicate account.
Signature
Arguments & Options
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
email | Argument | ✅ Yes | — | Email address of the user to create or update. |
--name | Option | No | Admin | Display name assigned to the user. |
--password | Option | No | password | Plain-text password (hashed with bcrypt before storing). |
Examples
What It Does Internally
Resolve arguments
Reads the
email argument and the --name and --password options. If --password is omitted or empty, falls back to the literal string 'password'.Upsert the user
Calls
User::updateOrCreate(['email' => $email], [...]) with role='admin', status='activo', the provided name, and the bcrypt-hashed password.subscriptions:sync-expired
Scans all active subscriptions for ones whoseend_date has passed, marks each one as expired, and revokes the corresponding course access grants for the affected users. This command is designed to be run automatically by the Laravel scheduler (see the Scheduler page), but can also be triggered manually at any time.
Signature
Arguments & Options
This command takes no arguments or options.Examples
What It Does Internally
Find expired subscriptions
Queries the
subscriptions table for records where status = 'activa' and end_date < now(). These are memberships that are still flagged as active in the database but have already passed their end date.Early exit if none found
If the query returns zero rows, outputs
No expired subscriptions found. and exits cleanly with no further database writes.Mark each subscription as expired
Iterates over the results and calls
$subscription->update(['status' => 'expirada']) on each one, using the STATUS_EXPIRED constant defined on the Subscription model.Sync access for each affected user
Calls
SubscriptionAccessService::sync($subscription->user_id) for every expired subscription. The service recalculates which courses the user may access based on their remaining active subscriptions and individual payment records, then updates the enrollments table accordingly.subscription:sync
Performs a full reconciliation ofsubscription_active flags across every user in the enrollments table. The optional --backfill flag also repairs the subscription_granted column on pre-migration enrollment rows that were created before the subscription system existed.
Signature
Arguments & Options
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--backfill | Flag | No | false | When present, runs a historical data repair pass before the main sync. |
Examples
What It Does Internally
Optional backfill pass (--backfill only)
Fetches every distinct
user_id from the enrollments table. For each user, it collects all course_id values from the payments table where status = 'aprobado'. Any enrollment row for that user that does not have a matching individual payment is assumed to have come from a subscription grant and is updated with subscription_granted = true. This repairs historical data created before the subscription system was introduced.Sync all users
Fetches every distinct
user_id from enrollments again and calls SubscriptionAccessService::sync($userId) for each one. This recalculates the subscription_active flag on all enrollment rows for every user in the system.