Download the PHP package daycode/stup-images without Composer

On this page you can find all versions of the php package daycode/stup-images. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package stup-images

Laravel Stup Image

Stup Image is a powerful Laravel package for storing and updating images with clean, readable code. Integrated with the Intervention Image library, it provides an elegant solution for handling file uploads with advanced features like automatic resizing, configurable filename hashing, and flexible storage options.

Downloads License


✨ Features


📦 Installation

1. Install via Composer

2. Publish Configuration (Optional)

This will create a config/stup-image.php file where you can customize the package behavior.

3. Configure Storage Disk

Make sure your config/filesystems.php has the desired disk configured. By default, the package uses the FILESYSTEM_DISK from your .env file.

4. Link Storage (if using public disk)

5. Clear Cache


⚙️ Configuration

After publishing the config file, you can customize these options in config/stup-image.php:


🚀 Usage

Basic Setup

Add the Stupable trait to your controller or any class:


📤 Upload File

Upload a single file to storage:


🖼️ Upload with Auto Resize

Automatically resize images during upload:


🔄 Sync Upload (Update & Replace)

Upload a new file and automatically delete the old one:


📦 Upload Multiple Files

Upload multiple files at once:


🗑️ Delete File

Delete a file from storage:


📖 API Reference

uploadFile(UploadedFile $file, string $path, ?array $resize = []): string

Upload a single file to storage.

Parameters:

Returns: Filename (string) or throws UploadException


syncUploadFile(UploadedFile $file, ?string $oldFileName, string $path): string

Upload a new file and delete the old one.

Parameters:

Returns: New filename (string)


uploadMultipleFiles(array $files, string $path): array

Upload multiple files at once.

Parameters:

Returns: Array of filenames or throws UploadException


deleteFile(string $fileName, string $path): void

Delete a file from storage.

Parameters:


🔧 Advanced Configuration

Using Different Storage Disks

The package respects your FILESYSTEM_DISK environment variable. To use different disks:

Local Storage:

Amazon S3:

DigitalOcean Spaces, Cloudinary, etc.: Configure your disk in config/filesystems.php and set FILESYSTEM_DISK accordingly.


Restrict File Extensions

Edit config/stup-image.php:


Disable Filename Hashing

If you want to keep original filenames:


🛡️ Security


📝 Examples

Complete CRUD Example


🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.


📄 License

This package is open-sourced software licensed under the MIT license.


👨‍💻 Credits


💬 Support

If you find this package helpful, please consider giving it a ⭐ on GitHub and Packagist!

For issues or questions, please use the GitHub Issues page.


All versions of stup-images with dependencies

PHP Build Version
Package Version
Requires intervention/image Version 3.11.2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package daycode/stup-images contains the following files

Loading the files please wait ...