PHPackages                             translucent/s3-observer - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [File &amp; Storage](/categories/file-storage)
4. /
5. translucent/s3-observer

AbandonedArchivedLibrary[File &amp; Storage](/categories/file-storage)

translucent/s3-observer
=======================

Observer to sync your Eloquent with Amazon S3

v0.4.2(12y ago)47MITPHPPHP &gt;=5.4.0

Since Jan 12Pushed 12y ago1 watchersCompare

[ Source](https://github.com/KentoMoriwaki/s3-observer)[ Packagist](https://packagist.org/packages/translucent/s3-observer)[ RSS](/packages/translucent-s3-observer/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (6)Versions (9)Used By (0)

Observer to sync your Eloquent with Amazon S3
=============================================

[](#observer-to-sync-your-eloquent-with-amazon-s3)

You can easily upload and delete images by S3Observer

```
$user = User::find($id);
$user->fill(Input::all());
if (Input::hasFile('profile_image')) {
    $user->profile_image = Input::file('profile_image');
}
if (Input::has('delete_profile_image')) {
    $user->profile_image = null;
}
$user->save();
```

Now the uploaded file is on Amazon S3!

How To Use
----------

[](#how-to-use)

### Before

[](#before)

You need setup [aws/aws-sdk-php-laravel](https://github.com/aws/aws-sdk-php-laravel) before use S3Observer

### Installation

[](#installation)

Require the `translucent/s3-observer` in your composer.json

```
{
    "require": {
        "translucent/s3-observer": "0.4.*"
    }
}
```

### Configuration

[](#configuration)

In order to use S3Observer, update settings files.

```
php artisan config:publish translucent/s3-observer
```

Sample configuration

```
return array(
    'public' => true,
    'bucket' => '',
    'base' => null,
    'acl' => null,
);
```

Add S3Observer provider and facade(optional) to app/config/app.php

```
'providers' => array(
     // ...
    'Translucent\S3Observer\S3ObserverServiceProvider',
),
'aliases' => array(
    // ...
    'S3Observer' => 'Translucent\S3Observer\Facades\S3Observer',
)
```

Sample Usage
------------

[](#sample-usage)

In your model,

```
protected static function boot()
{
    parent::boot();
    // Setup observer
    $observer = S3Observer::setUp('User', array(
        'bucket' => 'user-bucket'
    ));
    // Observe fields
    $observer->setFields('profile_image', 'thumbnail');
    // Fields configuration
    $observer->config('thumbnail.image', array(
        'width' => 150,
        'height' => 150
    ));
    static::observe($observer);
}
```

And in your controller...

```
public function postEdit($id)
{
    $user = User::findOrFail($id);
    $user->fill(Input::all());
    if (Input::hasFile('profile_image')) {
        $user->profile_image = Input::file('profile_image');
        $user->thumbnail = Input::file('profile_image');
    }
    if (Input::has('delete_profile_image')) {
        $user->profile_image = null;
				$user->thumbnail = null;
    }
    $user->save();
    return Redirect::to('/');
}
```

More information
----------------

[](#more-information)

To see more information, please check [Wiki](https://github.com/KentoMoriwaki/s3-observer/wiki)!

License
-------

[](#license)

Under the MIT license.

© Kento Moriwaki 2014.

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~1 days

Total

7

Last Release

4541d ago

PHP version history (2 changes)v0.0.0PHP &gt;=5.3.0

v0.4.0PHP &gt;=5.4.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/3349436?v=4)[Kento Moriwaki](/maintainers/KentoMoriwaki)[@KentoMoriwaki](https://github.com/KentoMoriwaki)

---

Top Contributors

[![KentoMoriwaki](https://avatars.githubusercontent.com/u/3349436?v=4)](https://github.com/KentoMoriwaki "KentoMoriwaki (21 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/translucent-s3-observer/health.svg)

```
[![Health](https://phpackages.com/badges/translucent-s3-observer/health.svg)](https://phpackages.com/packages/translucent-s3-observer)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3345.1M337](/packages/psalm-plugin-laravel)[laravel/ai

The official AI SDK for Laravel.

1.0k2.1M163](/packages/laravel-ai)[pressbooks/pressbooks

Pressbooks is an open source book publishing tool built on a WordPress multisite platform. Pressbooks outputs books in multiple formats, including PDF, EPUB, web, and a variety of XML flavours, using a theming/templating system, driven by CSS.

45344.0k1](/packages/pressbooks-pressbooks)[fleetbase/core-api

Core Framework and Resources for Fleetbase API

1232.2k16](/packages/fleetbase-core-api)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
