Download the PHP package dedmytro/laravel-cloudflare-images without Composer

On this page you can find all versions of the php package dedmytro/laravel-cloudflare-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 laravel-cloudflare-images

Cloudflare Images

Provides access to Cloudflare Images API for Laravel projects

Stable Version Unstable Version Total Downloads

Table of contents

Installation

To get the latest version of Laravel CloudflareImages, simply require the project using Composer:

Or manually update require block of composer.json and run composer update.

Configuration

Add environment variables to your .env file:

or publish config and set up vars there

CLOUDFLARE_IMAGES_KEY - is an API Token. To create a new one go to User Api Tokens on Cloudflare dashboard

CLOUDFLARE_IMAGES_ACCOUNT - is an Account ID on the Overview page

CLOUDFLARE_IMAGES_DELIVERY_URL - is an Image Delivery URL on the Overview page

CLOUDFLARE_IMAGES_DEFAULT_VARIATION - is a variation on the Variants page

CLOUDFLARE_IMAGES_SIGNATURE_TOKEN - is a token from the Images -> Keys page

Using

Direct upload

The Direct upload is feature of Cloudflare Images to upload image directly from frontend but without sharing your api key. Once you get this url you can use inside your html

<form method="post" enctype="multipart/form-data" action="{{ $uploadUrl }}">

IMPORTANT: You can use this url only once!

Upload

Call upload() method and pass file as local file path or UploadedFile instance. As a result of upload you'll get DetailsResponse instance with uploaded image details, so you can save it locally.

List

To list existing images you should use list() method which also has pagination and accept $page and $perPage arguments.

Details

To get existing image details you should use get($id) method where $id is image identifier you received when you list or upload the image.

Delete

To delete existing image you should use delete($id) method where $id is image identifier you received when you list or upload the image.

Public url

To generate image url locally call method url($id) and pass image ID. Don't forget to set up

Signed url

To generate signed image url locally call method signedUrl($id, $expires = 3600) and pass image ID and expiration time in seconds. Don't forget to set up


All versions of laravel-cloudflare-images with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4|^8.0
illuminate/support Version ^7.0|^8.0|^9.0|^10.0|^11.0
guzzlehttp/guzzle Version ^6.2.1|^7.0
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 dedmytro/laravel-cloudflare-images contains the following files

Loading the files please wait ....