- What is capell-app/media-library used for?
- It is a Laravel media library for Capell applications that handles uploading, organizing, and attaching images and files to Eloquent models. It adds configuration for storage disks, image conversions, responsive images, and metadata, plus health checks and safe asset migration. Use it when you want a Curator-powered media workflow inside a Capell app rather than wiring uploads and conversions yourself.
- How do I install capell-app/media-library in a Laravel application?
- Install it with Composer using composer require capell-app/media-library. In a standard Laravel app, package discovery registers the service provider; publish any package config and migrations if the repository instructions ask for it, then run migrations. Because this package targets Capell, confirm the Capell integration steps in the repository README before adding it to an existing app.
- Which Laravel versions does capell-app/media-library support?
- The package is built for Laravel applications that use Capell, but the exact Laravel and PHP constraints are defined in its composer.json. Check the repository or Packagist metadata for the current supported Laravel versions before installing. If you are on an older Laravel release, verify compatibility or test in a staging app first.
- How do I attach uploaded images or files to an Eloquent model?
- The package is designed to attach media to Eloquent models, so you add media support to the model and then attach uploaded files through the package's API. The repository README should show the trait or relationship setup and the upload calls for your version. After attaching, media records and conversions can be managed through the same library.
- How do I configure storage disks for original media and conversions?
- Publish the package configuration and set the disk or disks used for original files and generated conversions. The library supports configurable storage disks, so you can keep originals on one disk and conversions on another, or use Laravel's public and S3 disks. Verify the disk visibility and URL settings so optimized media can be served correctly.
- Can capell-app/media-library generate image conversions and responsive images?
- Yes. The package supports conversions and responsive images as part of its media management workflow. You configure the conversions you need and the library generates the derived images for attached media. Serving optimized media is handled through the package's developer-friendly API.
- What is Curator and how does this package use it?
- Curator is the media management foundation behind this package; capell-app/media-library provides Curator-powered media handling for Capell apps. That means the package focuses on integrating Curator's upload, conversion, and media organization features with Capell and Eloquent models. Review the repository docs to see which Curator features are exposed directly and which are configured through Capell.
- What do the health checks in capell-app/media-library verify?
- The package includes health checks to help confirm that its media setup is working correctly. They are intended to catch configuration or asset problems around storage, conversions, and migrated media before they affect production. Run them after installation, after configuration changes, and after asset migrations.
- How do I safely migrate existing media assets to capell-app/media-library?
- The package advertises safe asset migration, so use its migration workflow rather than moving files by hand. Back up the database and storage disks, test the migration in staging, and run the health checks afterward to confirm files and metadata are intact. Keep the old media available until you have verified URLs and conversions in the new setup.
- How should I test capell-app/media-library before using it in production?
- Use Laravel's Storage::fake and a test database to exercise uploads, model attachments, and conversion generation, then assert that media records and files are created as expected. Run the package health checks in staging against realistic disks and migrated assets before production. Also review the repository's release tags, test suite, and recent activity, and pin a specific Composer version.