infinety-es/nova-filemanager
Filemanager tool for Laravel Nova
Requires
- php: >=7.1.0
- laravel/nova: *
Requires (Dev)
- orchestra/testbench: ^3.6
- phpunit/phpunit: 7.1
README
A Filemanager Tool and Field for Laravel Nova
Filemanager Tool preview
Filemanager Field preview
Installation
You can install the package in any Laravel app that uses Nova via Composer:
composer require infinety-es/nova-filemanager
Next, you must register the tool with Nova. This is typically done in the tools
method of the NovaServiceProvider
.
// in app/Providers/NovaServiceProvider.php // ... public function tools() { return [ // ... new \Infinety\Filemanager\FilemanagerTool(), ]; }
Nova Filemanager works with Laravel Flysystem. The default disk is public
. You can customize the Flysystem disk by setting the FILEMANAGER_DISK
variable in your .env
file:
FILEMANAGER_DISK=public
Tool Usage
Click on the "FileManager" menu item in your Nova app to see the Filemanager Tool
Field Usage
use Infinety\Filemanager\FilemanagerField; FilemanagerField::make('field'); // You can also show preview images in Index and Detail views FilemanagerField::make('field')->displayAsImage();
Starting in v1.1.1, you can use the folder
option to set a initial folder for your field
FilemanagerField::make('field')->folder('avatars'); //or FilemanagerField::make('field')->displayAsImage()->folder('files/avatars');
Localization
Set your translations in the corresponding xx.json file located in /resources/lang/vendor/nova
... "Filemanager": "Gestor de archivos", "Create folder": "Crear carpeta", "Write a folder name": "Escribe el nombre de la carpeta", "Create": "Crear", "Creating": "Creando", "Cancel": "Cancelar", "The folder name is required": "El nombre de la carpeta es requerido", "Folder created successfully": "Carpeta creada correctamente", "Error creating the folder": "Error al crear la carpeta", "Preview of": "Vista previa de", "Name": "Nombre", "Mime Type": "Tipo de archivo", "Last Modification": "Última modificación", "Size": "Tamaño", "Dimensions": "Dimensiones", "Url": "Enlace", "Copy": "Copiar", "Select file": "Seleccionar archivo", "Remove File": "Eliminar archivo", "Are you sure?": "¿Estás seguro?", "Removing...": "Eliminando...", "Text copied to clipboard": "Texto copiado al portapapeles", "File removed successfully": "Archivo eliminado correctamente", "Error removing the file. Please check permissions": "Error al eliminar el archivo. Por favor, comprueba los permisos", "Home": "Inicio", "You don\\'t have permissions to view this folder": "No tienes permisos para ver esta carpeta", "No files or folders in current directory": "Esta carpeta esta vacía", "Remove directory": "Eliminar carpeta", "Folder removed successfully": "Carpeta eliminada correctamente", "Error removing the folder. Please check permissions": "Error al eliminar la carpeta. Por favor, comprueba los permisos", "Upload": "Subir", "Error on upload": "Error al subir", "Success": "Éxito", "Error uploading the file. Check your MaxFilesize or permissions": "Error al subir el archivo. Comprueba la directiva MaxFilesize o los permisos", "Select a file": "Selecciona un archivo", "Open FileManager": "Abrir Gestor de archivos", "This image": "Esta imagen", "could not be found.": "no se encuentra.", "Delete": "Eliminar", "Deselect File": "Deseleccionar archivo", "Are you sure you want to deselect this file?": "¿Estas seguro de querer deseleccionar este archivo?", "Remember: The file will not be delete from your storage": "Recuerda: El archivo no será eliminado de tu disco", "Deselect": "Deseleccionar"
Testing
composer test
yarn lint
yarn check-format
ToDo
AWS S3 supportDifferent upload method- Grid / List views
- FIles actions
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email apps@infinety.es instead of using the issue tracker.
Postcardware
You're free to use this package, but if it makes it to your production environment we highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using.
Our address is: Infinety - Calle Comedias, 8 Floor 3, Suite 5 46003 Valencia (Spain).
Credits
License
The MIT License (MIT). Please see License File for more information.