- How do I install Livewire Filemanager in a Laravel project?
- Run `composer require livewire-filemanager/filemanager` to install the package. Then publish its migrations with `php artisan vendor:publish --tag=livewire-filemanager-migrations`. Ensure Spatie Media Library is also configured by publishing its migrations if needed.
- What Laravel and Livewire versions does Livewire Filemanager support?
- The package requires PHP 8.2+ and is designed for Laravel 10/11/12/13. It assumes Livewire 3.x is already installed in your project. No conflicts with AlpineJS, which is used for UI enhancements.
- Can I use Livewire Filemanager without Spatie Media Library?
- No, Livewire Filemanager relies on Spatie Media Library for media handling, storage adapters, and thumbnail generation. You must install and configure `spatie/laravel-medialibrary` first via `composer require spatie/laravel-medialibrary`.
- How do I enable drag-and-drop uploads in Livewire Filemanager?
- Drag-and-drop functionality is built into the Livewire component (`<x-livewire-filemanager />`). Ensure you’re using the latest version of Livewire 3.x and that your TailwindCSS setup is properly configured for file upload interactions.
- Does Livewire Filemanager support custom storage backends like S3?
- Yes, it works with any storage backend supported by Spatie Media Library, including S3, Google Cloud Storage, and local storage. Configure your storage in `config/filesystems.php` and ensure Spatie’s medialibrary is set up for your chosen backend.
- How do I secure file uploads and restrict access to certain users?
- Livewire Filemanager does not include built-in authentication or ACLs. Use Laravel’s built-in auth (e.g., Sanctum for API endpoints) and configure ACLs in `config/livewire-filemanager.php` by setting `acl_enabled: true`. For public-facing apps, implement middleware or policies.
- Can I use the Livewire Filemanager API for non-Livewire clients like mobile apps?
- Yes, the package includes RESTful API endpoints at `/api/filemanager/v1/`. Secure these endpoints with Sanctum or Passport. Test thoroughly, as the API is relatively new and may evolve with future updates.
- How do I customize the UI, such as changing colors or adding a logo?
- Use TailwindCSS to override styles. Add custom classes to the `<x-livewire-filemanager />` component or extend the Tailwind config in `tailwind.config.js`. For branding, modify the Blade templates or use CSS variables.
- Are thumbnails generated synchronously or asynchronously?
- Thumbnails are generated asynchronously by default, using Laravel queues. Ensure your `QUEUE_CONNECTION` is properly configured (e.g., database, redis) and monitor queue workers to avoid blocking requests during high traffic.
- What are the risks of upgrading from v0.x to v1.0.0?
- The upgrade from v0.x to v1.0.0 is automated but requires running `php artisan filemanager:migrate-config` to avoid breaking changes. Review the changelog for deprecated features and test thoroughly, especially if using custom configurations or ACLs.