- What is andrew13/cabinet used for?
- Cabinet is a Laravel 4 package for managing file uploads and attaching files to Eloquent models. It provides a lightweight API for storing, retrieving, and deleting files, effectively adding a filing-cabinet-style media layer to your application. Its intended use is legacy Laravel 4 projects, not new development.
- Does Cabinet work with Laravel 5, Laravel 10, or Laravel 11?
- No, Cabinet is built for Laravel 4, which is end-of-life, and its last release was in 2015. It is not a fit for Laravel 5+ or modern Laravel versions. Modern applications should use Laravel's native Storage facade, Flysystem, or a maintained media package instead.
- How do I install andrew13/cabinet with Composer?
- Only attempt installation in a pinned Laravel 4 environment with legacy PHP and Symfony dependencies. Composer 2, PHP 8+, or a current Laravel install will likely hit platform and dependency constraints. Avoid mixing it into a modern service without a compatibility proof-of-concept.
- Is andrew13/cabinet safe for production file uploads?
- Treat it as high risk because it is unmaintained and predates modern upload security expectations. You must add explicit MIME/type validation, size limits, filename sanitization, storage path isolation, authorization, malware scanning, and audit logging around it. For new production systems, do not adopt it.
- How does Cabinet attach uploaded files to Eloquent models?
- Cabinet is described as providing a simple API for storing, attaching, retrieving, and deleting files, making it easy to add a media layer to Eloquent models. The exact relationship methods are defined by the legacy package and should be verified in the source or existing application usage. In a migration, inventory those model attachments before replacing the implementation.
- Can I use Cabinet on PHP 8 or with Composer 2?
- It is very unlikely to work cleanly, because the package targets Laravel 4-era PHP and Symfony components. Installation may fail on PHP 8+, Composer 2, or current Laravel due to platform constraints. If it must run, pin the legacy runtime and dependencies in a reproducible build.
- How do I migrate from Cabinet to Laravel Storage?
- Start by inventorying every upload entry point, storage path, database record, validation rule, and consumer flow. Put an internal upload service interface around current behavior, then replace Cabinet behind that adapter with native Laravel Storage or a maintained package. Migrate existing files with checksum verification and keep backward-compatible URLs during cutover.
- What are the best alternatives to Cabinet for Laravel file uploads?
- For modern Laravel, use the native filesystem and Storage facade with Flysystem, plus a maintained media or file-upload package where needed. Build your own upload abstraction if your requirements are custom. The key is to choose a package with active maintenance and support for your Laravel and PHP versions.
- Is andrew13/cabinet still maintained?
- No, the package is legacy, unmaintained, and its last release was in 2015. There is no meaningful upstream support, so your team would own patches, dependency pins, and security remediation. Plan for containment and replacement rather than long-term ownership.
- How should I test Cabinet uploads in a legacy Laravel 4 app?
- Add tests around upload, validation, storage, retrieval, deletion, and failure cases before changing anything. Cover MIME/type checks, file size limits, path isolation, authorization, orphaned records, missing files, and filename collisions. Freeze the legacy runtime in a container or reproducible build so the tests run consistently.