From d127d34661e343b1cc8c59b5003203abdd86c6df Mon Sep 17 00:00:00 2001 From: Ghassan Yusuf Date: Sun, 25 Jan 2026 14:51:15 +0300 Subject: [PATCH] Enhanced README with comprehensive documentation - Added Features section with detailed list - Added Requirements section - Added more usage examples (displaying images, custom filenames) - Added Contributing section - Added License section - Added Author information - Improved formatting and organization - Added emojis for better visual appeal - Removed trailing question about Git commands --- README.md | 104 ++++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 77 insertions(+), 27 deletions(-) diff --git a/README.md b/README.md index 7f83fb4..71499f2 100644 --- a/README.md +++ b/README.md @@ -4,28 +4,47 @@ A professional, multi-instance image cropping component for Laravel built on top --- +## ✨ Features + +- 📸 **Multi-instance Support** - Use multiple croppers on the same page +- 🔄 **Interactive Cropping** - Zoom, rotate, and position images with ease +- ⭕ **Shape Options** - Support for circle and rectangle viewports +- 🎨 **Bootstrap 5 Integration** - Beautiful, responsive UI out of the box +- 💾 **Automatic Storage** - Images saved directly to Laravel's public disk +- 🗑️ **Delete Functionality** - Built-in remove button with confirmation +- 🚀 **Lightweight** - Uses Cropme.js library (minimal dependencies) + +--- + +## 📋 Requirements + +- PHP >= 8.0 +- Laravel >= 11.0 +- Bootstrap 5.3+ +- jQuery 3.6+ + +--- + ## 🛠 1. Installation ### Add Repository Add the following to your **main project's** `composer.json` file to allow Composer to find your package: -JSON -``` +```json "repositories": [ { "type": "vcs", "url": "https://git.innovator.bh/ghassan/laravel-image-cropper" } -], +] ``` ### Require Package Run the following command in your terminal: -BASH -``` +```bash composer require takeone/cropper ``` @@ -33,8 +52,7 @@ composer require takeone/cropper The package saves images to the public disk. Link it to your project: -BASH -``` +```bash php artisan storage:link ``` @@ -54,14 +72,13 @@ Ensure your main layout file (e.g., `resources/views/layouts/app.blade.php`) inc @yield('content') - + - + @stack('modals') - ``` ### Adding the Component @@ -70,31 +87,47 @@ Each instance of the cropper requires a **unique ID**. #### Profile Picture (Circle) -html -``` +```html ``` #### Banner Image (Rectangle) -html -``` +```html