CLI Commands
Laravix ships four Artisan commands under the laravix: namespace. This is their complete reference; standard Laravel commands (migrate, queue:work, scout:import, …) apply as usual.
laravix:install
Interactive first-run setup: database, assets, first site and super admin.
php artisan laravix:install [options]
| Option | Effect |
|---|---|
--demo |
Seed demo content into the first site |
--force |
Run even when sites already exist |
--site-name= |
Name of the first site |
--domain= |
Domain of the first site |
--admin-name= |
Name of the super admin |
--admin-email= |
Email of the super admin |
--admin-password= |
Password of the super admin (min 8 characters) |
--no-interaction |
Fail instead of prompting (requires the options above; the database must already be reachable) |
What it does, in order: database setup (prompting for SQLite/MySQL/PostgreSQL if unreachable, writing .env), guard against an existing installation, migrate --force, storage:link, publish assets/config/views, publish the default theme (skipped if themes/default exists), create the first site (theme mode), create the super admin via laravix:user, optional demo seed.
laravix:user
Create a user that can log into the admin panel.
php artisan laravix:user [--name=] [--email=] [--password=] [--super]
--supercreates a super admin (access to all sites).- Without
--super, the command asks — and for a regular user it prompts for a site and a role (admin,editor,viewer). - Fails if the email is already taken; passwords must be at least 8 characters.
This is also the fastest way to attach a brand-new user to a site without the email invitation flow.
laravix:upgrade
Upgrade the Laravix core: composer update, migrations and asset republish.
php artisan laravix:upgrade [--force]
--force skips the "back up your database" confirmation. The full step-by-step behavior and failure recovery are described in Upgrading. Honors the COMPOSER_BINARY environment variable when Composer isn't on the PATH.
laravix:publish-scheduled
Publish scheduled content whose published_at date has passed.
php artisan laravix:publish-scheduled
Prints how many items were published. You normally never run this yourself — the package schedules it every minute, so it just works wherever php artisan schedule:run is wired into cron (see Deployment). Running it manually is handy when testing scheduling locally.
Useful standard commands in a Laravix context
| Command | Why you'd run it |
|---|---|
php artisan vendor:publish --tag=laravix-theme |
Get a fresh copy of the default theme into themes/default |
php artisan vendor:publish --tag=laravix-config |
Publish config/laravix.php for customization |
php artisan vendor:publish --tag=laravix-assets --force |
Republish admin assets (part of the upgrade) |
php artisan scout:import "Laravix\Cms\Models\Content" |
(Re)build the search index |
php artisan scout:sync-index-settings |
Push Meilisearch index settings |
php artisan queue:work |
Process image variant jobs |