amjadiqbal/laralink
Laralink is a Laravel package for creating and managing links inside your application. It offers a simple API for generating short or internal URLs, storing link records, and handling redirects, making link management easy to integrate into existing Laravel projects.
v2.0.0 is effectively the first release you can act on. 1.x was never on Packagist, and its tagged commands didn't implement the options its README described. Treat any 1.x tutorial, gist, or the old README as fiction — specifically --symlink, a laralink-config publish tag, and a config/laralink.php.
^1 to fall back to.composer require --dev amjadiqbal/laralink.php artisan about — look for the Laralink block showing the installed version and support link. If it's absent, the service provider isn't discovered; check bootstrap/providers.php and clear config.php artisan list laralink — the real surface area, not the README's.php artisan laralink:list — baseline on an app with nothing linked../packages/.laralink.json — created after your first link; this file, not your memory, is the source of truth for how each package is linked and what constraint it had before.php artisan laralink:dev --source=../billing. You now have a path repository (added first) plus a symlink into vendor/. Edit the source folder, refresh, no publish cycle. If you don't pass --source, interactive mode offers packages found in ../*, ../*/*, and ~/projects.Inner loop (folder link). laralink:dev --source=../acme/billing → edit → refresh. Leave it linked for the whole feature. laralink:list --filter=local tells you what's currently wired to your disk.
Review a branch or tag without a release. laralink:dev [email protected]:acme/billing.git --branch=feature/retries. Any Git URL form works: https://, git@host:, ssh://, file://. This is the highest-value pattern — smoke test a PR against your actual app instead of a scratch project.
Copy instead of symlink when the package cares about its own path. --copy for anything that resolves __DIR__, hardcodes paths, or does its own composer install. It also behaves more predictably in Docker/CI where bind mounts make symlink targets confusing. Dot folders (.git, .github) are preserved.
Keep dev tooling out of production. laralink:dev preserves require-dev if the package was there. So test helpers and generators stay dev-only through the link/publish cycle without you touching composer.json by hand.
Promote to a real dependency. laralink:publish acme/billing --backup. It restores the constraint the package had before linking, or requires the latest release if there wasn't one — no more "always latest." The backup lands in ./packages/.backups/ with Git history included, so it's a real escape hatch, not a tarball.
Use --json for guards. php artisan laralink:list --json for a pre-push or CI step that fails when anything is still linked. Filters are only local|remote; the interesting signal is the status field (linked, local files not linked, linked but not required, remote) — use that to detect drift rather than the filter.
Cleanup. laralink:publish --delete on a symlinked package removes only the symlink; the source folder is never touched. A clone with uncommitted changes won't be deleted without --backup or --force.
Re-pointing. Swapping ../billing-old for ../billing-new needs --force; it runs composer reinstall so vendor/ follows the new target.
Version-check escape hatch. --skip-version-check when the package's own composer.json declares a Laravel/PHP constraint your app technically misses but you know works. Good for evaluating a package before its author bumps the constraint.
Repository ordering is a feature. The path repository is added first, so it wins over Packagist and any other repo. Handy for testing a fork that shadows a public package name.
--symlink is removed. Symlinking is the default for folders; --copy opts out. Any script or muscle memory using --symlink will fail.laralink-config tag or config/laralink.php. Per-package state lives in ./packages/.laralink.json; everything else is flags.composer.json with Composer semver rules. A stale illuminate/support constraint in the dependency blocks the link even when the code is fine. Fix the package, or pass --skip-version-check knowingly.laralink:dev restores composer.json and removes the link/clone it made — you're clean. laralink:publish restores composer.json but leaves the package linked — you're safe but unfinished; re-run, don't assume it succeeded.--delete --force on a clone is destructive. Without --backup or --force it refuses when there are uncommitted changes. Check git status in the clone before forcing; there is no undo once it's gone.Amjadiqbal\Laralink while Composer autoloads AmjadIqbal\Laralink. If you forked, extended, or string-matched those class names, re-verify — class_exists and instanceof are case-sensitive on Linux and CI will catch you if your laptop doesn't.acme/billing is linked you cannot validate the released version in the same app. Run laralink:list before tagging your own release, or you'll ship against local code.composer install inside a symlinked package unless you intend to mutate the source repo's vendor/. Use --copy if you need an isolated install..laralink.json and ./packages/.backups/ are app-local. Keep the state file out of git; treat the backups folder as something you back up deliberately, since it's your recovery path after a --delete.php artisan about (version) → laralink:list --json (state + lockfile version) → cat packages/.laralink.json (remembered constraint) → composer config repositories (ordering) → composer why acme/billing.--source accepts absolute paths, ~/, and file://, so you can point at a mounted volume, a build artifact directory, or a sibling checkout outside the project tree — useful when the package lives in a monorepo that isn't adjacent to the app.How can I help you explore Laravel packages today?