Download the PHP package ankitpokhrel/laravel-image without Composer

On this page you can find all versions of the php package ankitpokhrel/laravel-image. 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-image

Laravel Image

Latest Version Scrutinizer Code Quality Travis Build Code Coverage StyleCI Total Downloads

Image Upload Package for Laravel 5+

Overview

Laravel Image is a image upload and thumbnail management package for laravel 5+. This package uses Glide library from the php league for on-demand image manipulation.

Installation

For 5.1 use 5.1 branch.
For 5.2 use 5.2 branch.
For 5.3 use master branch.

Pull the package via composer

Include the service provider within config/app.php.

Finally publish the configuration

Configuration

You can add default configurations to config/laravelimage.php.

Usage

Uploading Image

Within your controllers, get access to image upload service via dependency injection

And then, in your store or update method you can perform image upload

Uploaded file info

You can get uploaded file info using $this->image->getUploadedFileInfo(). It will return array as follow:

To change image field you can use setUploadField() method. If you wish to change upload_dir field you can use setUploadDir method. Usually you will save image, upload_dir and original_image_name to the database.

To get validation errors, you can use getValidationErrors() method.

Customizing upload path

Sometime you may want to group uploaded image or even store image somewhere else other than the public folder. You can do it by setting base path. For example, this settings below will store images inside public/uploads/user-images/users/ directory.

If you want to upload image in other places other than public folder, you can provide second parameter as false to the base path method.

This will upload image to /absolute/path/to/your/folder/uploads/users folder. Make sure that the folder has proper permission to store the images.

Using blade directive to display images

Display full image

Create image of custom size at runtime

Options & attributes

Options can be any glide options. See thephpleague/glide for more info on options.

Displaying image without blade

Image source should be in the format laravelimage.routePath/uploadDir/image?options, where laravelimage.routePath is from configuration file. So if you set your routePath to cache, the image url will be something like this.

Generated images are cached inside storage/laravel-image-cache.


All versions of laravel-image with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6.4
laravel/framework Version 5.3.*
league/glide-laravel Version ^1.0
phpunit/phpunit Version 5.5.*
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 ankitpokhrel/laravel-image contains the following files

Loading the files please wait ....