Download the PHP package hollogram/laravel-stapler2 without Composer

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

laravel-stapler

Latest Stable VersionTotal Downloads Latest Unstable Version License

Laravel-Stapler is a Stapler-based file upload package for the Laravel framework. It provides a full set of Laravel commands, a migration generator, and a cascading package config on top of the Stapler package. It also bootstraps Stapler with very sensible defaults for use with Laravel. If you are wanting to use Stapler with Laravel, it is strongly recommended that you use this package to do so.

Laravel-Stapler was created by Travis Bennett.

Requirements

This package currently requires php >= 5.4 as well as Laravel >= 4. If you're going to be performing image processing as part of your file upload, you'll also need GD, Gmagick, or Imagick (your preference) installed as part of your php environment.

Installation

Laravel-Stapler is distributed as a composer package, which is how it should be used in your app.

Install the package using Composer. Edit your project's composer.json file to require codesleeve/laravel-stapler.

Once this operation completes, the final step is to add the service provider.

For Laravel 4, Open app/config/app.php, and add a new item to the providers array:

For Laravel 5, Open config/app.php, and add a new item to the providers array:

Deprecations

As of 1.0.04, the 'Hollogram\LaravelStapler\LaravelStaplerServiceProvider' service provider has been deprecated (this provider will be removed in the next major release). Instead, you should now be using the corresponding service provider for the specific version of Laravel that you're using.

migrating-from-Stapler-v1.0.0-Beta4

If you've been using Stapler (prior to v1.0.0-Beta4) in your Laravel app, you now need to be using this package instead. Uninstall Stapler (remove it from your composer.json, remove the service provider, etc) and install this package following the instructions above. Once installed, the following changes may need need to be made in your application:

Quickstart

In the document root of your application (most likely the public folder), create a folder named system and grant your application write permissions to it. For this, we're assuming the existence of an existing User model in which we're going to add an avatar image to.

In your model:

Make sure that the hasAttachedFile() method is called right before parent::__construct() of your model.

From the command line, use the migration generator:

In your new view:

In your controller:

In your show view:

To detach (reset) a file, simply assign the constant STAPLER_NULL to the attachment and the save):

This will ensure the the corresponding attachment fields in the database table record are cleared and the current file is removed from storage. The database table record itself will not be destroyed and can be used normally (or even assigned a new file upload) as needed.

Commands

fasten

This package provides a fasten command that can be used to generate migrations for adding image file fields to existing tables. The method signature for this command looks like this: php artisan stapler:fasten <tablename> <attachment>

In the quickstart example above, calling php artisan stapler:fasten users avatar followed by php artisan migrate added the following fields to the users table:

refresh

The refresh command can be used to reprocess uploaded images on a model's attachments. It works by calling the reprocess() method on each of the model's attachments (or on specific attachments only). This is very useful for adding new styles to an existing attachment when a file has already been uploaded for that attachment.

Reprocess all attachments for the ProfilePicture model: php artisan stapler:refresh ProfilePicture

Reprocess only the photo attachment on the ProfilePicture model: php artisan stapler:refresh TestPhoto --attachments="photo"

Reprocess a list of attachments on the ProfilePicture model: php artisan stapler:refresh TestPhoto --attachments="foo, bar, baz, etc"

Troubleshooting

Before you submit an issue or create a pull request, please take a look at the Troubleshooting Section section of the Stapler package. There's a very good chance that many (if not all) of the issues you're having with this package are related to the base stapler package and have already been addressed there.

Contributing

This package is always open to contributions:


All versions of laravel-stapler2 with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4.0
hollogram/stapler2 Version 2.0.*
laravel/framework Version 4.*|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 hollogram/laravel-stapler2 contains the following files

Loading the files please wait ....