Download the PHP package rymanalu/laravel-simple-uploader without Composer

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

Laravel 5 Simple Uploader

Build Status Total Downloads Latest Stable Version License

Uploading files and store its in Filesystem / Cloud storage in Laravel 5 is not easy and simple for some developers. This package provides a simple way to do that, and comes with fluent interface that you might like.

Installation

First, install this package via the Composer package manager:

Next, you should add the UploaderServiceProvider to the providers array of your config/app.php configuration file:

Don't forget to add the Uploader facade to the aliases array for shorter code:

After that, you should publish the Uploader configuration using the vendor:publish Artisan command. This command will publish the uploader.php configuration file to your config directory:

Configuration

The Uploader configuration is located at config/uploader.php, where you can adjust the default file provider and the default file visibility as you want.

File Providers

This package comes with two file providers, from HTTP request and local filesystem. Before uploading a file, you can set where the file is provided. Example:

If you call method on the Uploader facade without first calling the from method, the uploader will assume that you want to use the default provider.

Usage

Uploading a File

Now, uploading a file is very simple like this:

The upload method accept a request key or path where the file is located (based on the file provider) as first parameter and returns a boolean: true if succeed or false if failed.

You may pass a Closure callback as second parameter that will be called if the file successfully uploaded:

Choosing the File Storage

Automatically, the Uploader will use your default Filesystem Disk when storing the file. But, you can choose where you will store the file with uploadTo method:

Set the Folder

Maybe you want to specify the folder where the file will be stored. Just use the toFolder method:

Rename the File

Adjust the filename as you want with renameTo method:

If you ignore this method, the file will be renamed to random and unique name.

File Visibility

You may set the file visibility using the setVisibility method:

Or just ignore this, and the Uploader will set the visibility based on your configuration.

Method Chainning

All the methods above except the upload method, are chainable. Feel free to call other methods before calling the upload. Example:

Adding Custom File Provider

Implementing The Provider

Your custom file provider should implement the Rymanalu\LaravelSimpleUploader\Contracts\Provider. This interface contains just a few simple methods we need to implement. A stubbed Google Drive implementation looks something like this:

Registering The Provider

Once your provider has been implemented, you are ready to register it with the UploaderManager. To add additional drivers to the manager, you may use the extend method on the Uploader facade. You should call the extend method from the boot method of a service provider. You may do this from the existing AppServiceProvider or create an entirely new provider:

Once the provider driver has been registered, you may use the gdrive driver in your config/uploader.php configuration file.


All versions of laravel-simple-uploader with dependencies

PHP Build Version
Package Version
Requires php Version >=5.5.9
illuminate/http Version ^5.0
illuminate/support Version ^5.0
illuminate/contracts Version ^5.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 rymanalu/laravel-simple-uploader contains the following files

Loading the files please wait ....