A reusable component for managing attachments in Laravel-based web application.
The repository was developed as a sub-project of an existing project, with a mission to re-use this code with less effort wherever necessary.
- Requirements
- Features
- Documentation
- UI (User Interface)
- Known Issues (When not to use)
- Roadmap
- License
- Credits
- Laravel 5.6+ (Tested up to 8.x)
- Bootstrap 3.4.1/4.x styles
- Grids
- Panels (Cards)
- Forms
- Alerts
- Buttons
- jQuery 2.x+
- Defined attachments can be managed
- Attachments can be defined for any types of scopes
- A custom label can be accepted where necessary
- Mandatory and optional attachments can be defined and managed accordingly
- Maximum upload size [per file] can be defined globally
- Accepted file types can be managed globally
- Accepted file types can be defined for each of the types of attachment
- Translation-ready (English and Bengali are defined by default)
Features that not present can be found under "Known Issues" section.
- Implementation Guide
- Implementation Checklist (guideline from other perspective)
- Overriding Things
The design is not the primary concern of the package and is not implemented as visible in the screenshots.
✔️ The basic functional UI with no blocking UX is implemented.
But the screenshots are taken from the actual use case where we modified things to match with our custom layouts in Limitless admin framework with Bootstrap 3.3.7.
- Variable number of Attachments not supported:
If you want to let the user add attachments on their choice, and there are no fixed attachments defined, this repository won't fit - No separate uploading (Larger files matter):
The module will store files (attachments) when the parent form will store data. If you are dealing with larger files and there are many types defined then themax_input_vars
inphp.ini
needs to be revised, or altered using.htaccess
with the resource available here. (Solution: A possible solution could be to use JavaScript-based file upload) - JavaScript-based upload will change file path:
If the file upload part is managed using JavaScript upload, then the/scope_key/scope_id/file.ext
concept won't work, and the files will be stored in/year/month/file.ext
path, unless thescope_id
is managed by any way
- Facilitate to employ multiple segments in the same scope to accept segmented attachments
- Make it more robust to use like a Laravel package
- If a Laravel package is been developed, publish it to packagist.org
The code is licensed in MIT.
Project initiated and lead by Mr. Mayeenul Islam Mayeen. Ms. Mowshana Farhana Mow implemented the idea.
Heartiest thanks to Mr. Nazmul Hasan, Tanvir Rahman, Shakhawat Hossain Mollah, and Shipon Hossain for their valuable feedback and guidance.