Skip to content

[4.x] Document tenants:link command #216

Description

@lukinovec

NOTE: Update this if the tenancy.filesystem.url_override config key name changes (for more context)

Link (tenant-aware) {link}

The tenants:link command can be used to create or remove symbolic links of tenants.

Tenants can have a symlink for each disk registered in the tenancy.filesystem.url_override config. For example, if you have 'public' => 'public-%tenant_id%' in the config, using tenants:link creates a folder named "public-$tenantId" in the public directory for each tenant. These folders link to the app/public folder in the storage directories of your tenants.

Aside from the options that can be passed to all tenant-aware commands, this command accepts the following options:

  • --remove – remove the symlinks instead of creating them
  • --relative – the symlinks will be created using relative paths
  • --force – create the symlink even if it already exists (if this is not passed and some link already exists, the command will throw an error)
php artisan tenants:link

The links have been created.

php artisan tenants:link --remove

The links have been removed.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions