Download the PHP package laravelguru/laravel-filehandler without Composer
On this page you can find all versions of the php package laravelguru/laravel-filehandler. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download laravelguru/laravel-filehandler
More information about laravelguru/laravel-filehandler
Files in laravelguru/laravel-filehandler
Package laravel-filehandler
Short Description The Laravel Inertia React File Management package seamlessly integrates file management into your Laravel applications using React and Inertia.js. Featuring prebuilt file input components and popup file dialogs, this package simplifies file uploads, storage, browsing, and management.
License MIT
Homepage https://github.com/InsafNilam/file-manager.git
Informations about the package laravel-filehandler
Laravel Inertia React File Management Package
Overview
The Laravel Inertia React File Management package provides seamless file management capabilities for your Laravel applications using React and Inertia.js. It includes prebuilt file input components and popup file dialogs for easy file uploads, storage, browsing, and management.
Features
- Seamless integration with React and Inertia.js
- Utilizes ShadCN components for dialogs, buttons, scroll areas, and tabs
- Prebuilt file input components and popup file dialogs
- Smooth single-page application (SPA) transitions
- Comprehensive file operations: upload, download, delete, move files
- Responsive file browser
- Ideal for CMS, e-commerce platforms, project management tools, and personal portfolios
Installation
You can install the package via composer:
Register Service Provider
If you are using laravel 11 or update version you should add the service provider into bootstrap/providers.php:
Publishing Assets
Run the following commands to publish the package assets:
-
This package is designed to be loaded only when the application is running in a web environment, ensuring it's not unnecessarily loaded during command-line operations. By checking if the app is running in the console using app()->runningInConsole();
- The package optimizes performance by activating only when needed for web requests, keeping the application lightweight during CLI operations.
please know the use case before publishing the resources
- If you don't use pre-built components, just migration is enough
- If you don't use pre-built components, doesn't require modifications you might need migration, model, resource, components
- Otherwise, you need to require everything
Link up the Storage of the Laravel
Install shadcn/ui Components (only if predefined components are used)
Initialize the shadcn/ui components by following the official installation guide. Use the commands below to add the required components:
Setup
- Install Dependencies: Ensure you have React and Inertia.js set up in your Laravel project.
- Integrate Components: Use the provided React components and Inertia.js middleware in your application.
- Customize: Modify the components and handlers as needed to fit your requirements.
- Run Migrations: Apply the migrations to your database:
Run Migration
The service provider will automatically generate a migration for the file_repos table when the application boots. Run the migration using:
Usage
While views/components can be optional for API development, integrating them can enhance user experience. This package focuses on providing core API routes for index, show, store, update, and delete operations. If you're primarily handling file management, this package can serve as a solid foundation.
- Description: Constructor method that injects the FileService class, making it available to the FileController class.
Description: Retrieves and returns a paginated list of files associated with the authenticated user within the 'documents' folder.
Description: Handles the uploading of new files. It receives the files from the request, processes the upload, and returns a JSON response indicating the success or failure of the operation.
Description: A private method that performs the actual upload of files to storage and updates the database within a transaction. It returns the uploaded files' data.
Description: Retrieves and returns the details of a specific file.
Description: Updates an existing file with new data. It processes the file modification and returns a JSON response indicating the success or failure of the operation.
Description: Deletes a specified file and returns a JSON response indicating the success or failure of the deletion operation.
Leverage pre-built components for efficient development.
This package offers ready-to-use file input and multiple file handling components built on top of Shadcn UI. Streamline your development process with pre-designed, customizable elements. Enjoy enhanced user experience and rapid prototyping.
FileInput
Handle Multiple Files
-
Validation Rules Configuration
-
Database Migration Setup
-
Controller Method for the Create Function (Ensure Focus on the documents variable during File Synchronization in Your Views)
-
Guide to Using File Input for File Synchronization in your Create View (Ensure Focus on the documents variable + brochures during File Synchronization in Your Views)
-
Controller Method for the Store Function (Ensure Focus on the brochures variable during File Store in respective database table)
-
Controller Method for the Edit Function (Ensure Focus on the documents variable + brochures during File Synchronization in Your Views)
-
Guide to Using File Input for File Synchronization in your Edit View (Ensure Focus on the documents variable + brochures during File Synchronization in Your Views)
- Controller Method for the Update Function (Ensure Focus on the brochures variable during File Update in respective database table)
Handle Single File
-
Validation Rules Configuration
-
Database Migration Setup
-
Controller Method for the Edit Function (Ensure Focus on the cv_path and documents variable during File Edit during File Synchronization in Your Views)
- Guide to Using File Input for File Synchronization in your Edit View (Ensure Focus on the cv_path variable + brochures during File Synchronization in Your Views)
Handle Show File
-
Controller Method for the Show Function (multiple + single) (Ensure Focus on the brochures variable during File Show during File Synchronization in Your Views)
- Guide to display files that used File Input for File Synchronization in your Show View (Ensure Focus on the brochures variable during File Synchronization in Your Views)
FileDialog
-
Validation Rules Configuration
-
Database Migration Setup
- Frontend Implementation
The store and update methods using the File Dialog for models function similarly to how you handle other string variables in Laravel. For detailed guidance, please refer to the Laravel Documentation.
Testing
Changelog
Please see CHANGELOG for more information what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
Credits
- Insaf Nilam
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
Laravel Package Boilerplate
This package was generated using the Laravel Package Boilerplate.
All versions of laravel-filehandler with dependencies
inertiajs/inertia-laravel Version ^1.3.0
laravel/framework Version ^8.74|^9.0|^10.0|^11.0
illuminate/support Version ^10.0|^11.0