2017 © Pedro Peláez
 

library stapler

Elegant and simple ORM-based file upload package for php.

image

codesleeve/stapler

Elegant and simple ORM-based file upload package for php.

  • Sunday, March 12, 2017
  • by tandrewbennett
  • Repository
  • 25 Watchers
  • 535 Stars
  • 247,123 Installations
  • PHP
  • 8 Dependents
  • 0 Suggesters
  • 145 Forks
  • 50 Open issues
  • 17 Versions
  • 4 % Grown

The README.md

Stapler

Build Status Latest Stable Version Total Downloads Latest Unstable Version License, (*1)

Note: If you've previously been using this package, then you've been using it with Laravel. This package is no longer directly coupled to the Laravel framework. As of 1.0.0, Stapler is now framework agnostic. In order to take advantage of the Laravel specific features provided by the previous Beta releases (service providers, IOC container, commands, migration generator, etc) , I've created a separate package specifically for the purpose of using Stapler within Laravel: Laravel-Stapler. If you're using Stapler inside a Laravel application I strongly recommend you use this package (it will save you a bit of boilerplate)., (*2)

Stapler is a php-based framework agnostic file upload package inspired by the Ruby Paperclip gem. It can be used to add file file uploads (as attachment objects) to your ORM records. While not an exact duplicate, if you've used Paperclip before then you should feel quite comfortable using this package., (*3)

Stapler was created by Travis Bennett., (*4)

Requirements

Stapler currently requires php >= 5.4 (Stapler is implemented via the use of traits)., (*5)

Installation

Stapler is distributed as a composer package, which is how it should be used in your app., (*6)

Install the package using Composer. Edit your project's composer.json file to require codesleeve/stapler., (*7)

  "require": {
    "codesleeve/stapler": "1.0.*"
  }

About Stapler

Stapler works by attaching file uploads to database table records. This is done by defining attachments inside the table's corresponding model and then assigning uploaded files (from your forms) as properties (named after the attachments) on the model before saving it. Stapler will listen to the life cycle callbacks of the model (after save, before delete, and after delete) and handle the file accordingly. In essence, this allows uploaded files to be treated just like any other property on the model; stapler will abstract away all of the file processing, storage, etc so you can focus on the rest of your project without having to worry about where your files are at or how to retrieve them., (*8)

Key Benefits

  • Modern: Stapler runs on top of php >= 5.4 and takes advantage of many of the new features provided by modern php (traits, callable typehinting, etc).
  • Simple: Traditionally, file uploading has been known to be an arduous task; Stapler reduces much of the boilerplate required throughout this process. Seriously, Stapler makes it dead simple to get up and running with file uploads (of any type).
  • Flexible: Stapler provides an extremely flexible cascading configuration; files can be configured for storage locally or via AWS S3 by changing only a single configuration option.
  • Scalable: Storing your assets in a central location (such as S3) allows your files to be accessable by multiple web instances from a single location.
  • Powerful: Stapler makes use of modern object oriented programming patterns in order to provide a rock solid architecture for file uploading. It's trait-based driver system provides the potential for it to work across multiple ORMS (both Active Record and Data Mapper implementations) that implement life cycle callbacks.

Documentation

The Versions

08/10 2016

dev-master

9999999-dev

Elegant and simple ORM-based file upload package for php.

  Sources   Download

MIT

The Requires

 

The Development Requires

orm file s3 upload aws paperclip

30/01 2016

v1.2.0

1.2.0.0

Elegant and simple ORM-based file upload package for php.

  Sources   Download

MIT

The Requires

 

The Development Requires

orm file s3 upload aws paperclip

30/01 2016

v1.1.02

1.1.02.0

Elegant and simple ORM-based file upload package for php.

  Sources   Download

MIT

The Requires

 

The Development Requires

orm file s3 upload aws paperclip

19/01 2016

v1.1.01

1.1.01.0

Elegant and simple ORM-based file upload package for php.

  Sources   Download

MIT

The Requires

 

The Development Requires

orm file s3 upload aws paperclip

05/12 2015

v1.1.0

1.1.0.0

Elegant and simple ORM-based file upload package for php.

  Sources   Download

MIT

The Requires

 

The Development Requires

orm file s3 upload aws paperclip

19/09 2015

v1.0.06

1.0.06.0

Elegant and simple ORM-based file upload package for php.

  Sources   Download

MIT

The Requires

 

The Development Requires

orm file s3 upload aws paperclip

21/04 2015

v1.0.05

1.0.05.0

Elegant and simple ORM-based file upload package for php.

  Sources   Download

MIT

The Requires

 

The Development Requires

orm file s3 upload aws paperclip

02/02 2015

v1.0.04

1.0.04.0

Elegant and simple ORM-based file upload package for php.

  Sources   Download

MIT

The Requires

 

The Development Requires

orm file s3 upload aws paperclip

02/02 2015

v1.0.03

1.0.03.0

Elegant and simple ORM-based file upload package for php.

  Sources   Download

MIT

The Requires

 

The Development Requires

orm file s3 upload aws paperclip

27/09 2014

v1.0.02

1.0.02.0

Elegant and simple ORM-based file upload package for php.

  Sources   Download

MIT

The Requires

 

The Development Requires

orm file s3 upload aws paperclip

12/06 2014

v1.0.01

1.0.01.0

Elegant and simple ORM-based file upload package for php.

  Sources   Download

MIT

The Requires

 

The Development Requires

orm file s3 upload aws paperclip

11/06 2014

v1.0.0

1.0.0.0

Elegant and simple ORM-based file upload package for php.

  Sources   Download

MIT

The Requires

 

The Development Requires

orm file s3 upload aws paperclip

10/01 2014

v1.0.0-Beta4

1.0.0.0-beta4

Easy file attachment management using Eloquent in Laravel 4

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel file s3 upload aws paperclip lpm

14/09 2013

v1.0.0-Beta3

1.0.0.0-beta3

Easy file attachment management using Eloquent in Laravel 4

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel file s3 upload aws paperclip lpm

20/08 2013

v1.0.0-Beta2

1.0.0.0-beta2

Easy file attachment management using Eloquent in Laravel 4

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel file upload paperclip

18/08 2013

v1.0.0-Beta1

1.0.0.0-beta1

Easy file attachment management using Eloquent in Laravel 4

  Sources   Download

MIT

The Requires

 

The Development Requires

  • mikey179/vfsstream 1.2.0

laravel file upload paperclip