Artisan Commands
Redot Core adds a set of Artisan commands for build steps, maintenance chores, permission discovery, and the database-driven translation workflow. They are available the moment the package is installed — no registration needed.
This page covers the operational commands. The scaffolding generators (make:entity, make:view, model:populate) are documented on the Scaffolding & Stubs page.
dependencies:build
php artisan dependencies:buildCompiles the front-end runtime bundles — per-locale translation files and the component initializer bundle — into the dist directory, and records a lock file so a rebuild can be detected later. Run it after changing translation files or anything under public/assets/inits, and during deploy so the first web request doesn't pay for the build. See the Asset & Init System for how these bundles are loaded.
uploads:clear
php artisan uploads:clearDeletes every file under public/uploads. It is interactive — it lists what it found and asks for confirmation before deleting, with a progress bar. There is no force flag, so keep that in mind in non-interactive environments.
lint
php artisan lint
php artisan lint --with-jsRuns Laravel Pint over the whole project. This is the canonical formatting entry point for the project (also exposed as composer lint).
--with-js— additionally runs Prettier over the project, but only whennpmis available; otherwise the JS step is skipped with a notice.
public:link
php artisan public:link
php artisan public:link --name=public_htmlCreates a symbolic link from the framework's public/ directory to a sibling directory in the project root. Use it on shared-hosting layouts where the web root must have a specific name. It will not overwrite an existing directory or link.
--name— the name of the link to create (defaults topublic_html).
datatables:link
php artisan datatables:link
php artisan datatables:link --force
php artisan datatables:link --relativeCreates a symbolic link from public/vendor/datatables to the Datatables package assets. Required once per install (and again after upgrades) so the table's CSS/JS are served statically. Prefer vendor:publish --tag=datatables::assets if symlinks are unavailable.
--force— recreate the symlink if it already exists.--relative— create a relative symlink.
permissions:sync
php artisan permissions:syncAuto-discovers permission-guarded routes and persists them as Spatie permission records. Discovery includes every HTTP verb. Conventional store routes share their create permission, conventional update routes share their edit permission, and overrides configured with usePermission() or resource-level usePermissions() use their explicit permissions. Synced permissions are stamped with a discovered_at timestamp; permissions created by hand are never stamped. Existing permissions are left untouched by default. Run it (or re-seed) whenever you add, rename, or remove permission-guarded routes.
--prune— after syncing, delete previously discovered permissions that no longer match any route. The command lists the stale permissions and asks for confirmation before deleting. Permissions created by hand (without adiscovered_atstamp) always survive pruning. Pass--forceto skip the confirmation prompt.--grant=— after syncing, assign every discovered permission to an admin identified by id (--grant=1) or email (--grant=admin@example.com). The target must use Spatie'sHasRoles(orHasPermissions) trait. Grants are additive — existing assignments are kept.
php artisan permissions:sync --grant=1
php artisan permissions:sync --prune --force --grant=admin@example.comFor day-to-day local work without syncing at all, prefer redot.permissions.bypass. See Middleware for permission resolution and opt-out details.
Language token commands
These four commands drive the database-backed translation workflow. Each takes an optional language code argument; when supplied, only that language is processed, otherwise every language is. They run synchronously, so no queue worker is required — but the language code must already exist.
A typical lifecycle is lang:extract to gather strings, edit translations in the dashboard, then lang:publish to write them to files. See Localization for how languages and tokens fit together.
lang:extract
php artisan lang:extract
php artisan lang:extract arExtracts translation tokens from the source code into the database.
language— process only the language with this code (optional).
lang:sync
php artisan lang:sync
php artisan lang:sync enSyncs the database tokens with the on-disk language files.
language— process only the language with this code (optional).
lang:publish
php artisan lang:publish
php artisan lang:publish arWrites the database tokens back out to the language files.
language— process only the language with this code (optional).
lang:revert
php artisan lang:revert
php artisan lang:revert arReverts tokens to their original values.
language— process only the language with this code (optional).
Related
- Scaffolding & Stubs — the
makegenerators. - Asset & Init System — what
dependencies:buildproduces. - Localization — the language token workflow.