PHPackages                             oza/user-images-manager - 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. [Image &amp; Media](/categories/media)
4. /
5. oza/user-images-manager

ActiveLibrary[Image &amp; Media](/categories/media)

oza/user-images-manager
=======================

A package to help you manage your users images such as avatars or covers

1.0.1(8y ago)117MITPHPPHP &gt;=7.0

Since May 5Pushed 8y agoCompare

[ Source](https://github.com/oza75/UserImagesManager)[ Packagist](https://packagist.org/packages/oza/user-images-manager)[ Docs](https://github.com/oza75/UserImagesManager)[ RSS](/packages/oza-user-images-manager/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (1)Versions (3)Used By (0)

Laravel Package that help your to manage your users images such as avatars and covers
=====================================================================================

[](#laravel-package-that-help-your-to-manage-your-users-images-such-as-avatars-and-covers)

- Requirements
    ------------

    [](#requirements)

    - PHP 7.0 or higher
    - Laravel 5.6.x or higher
- Installation
    ------------

    [](#installation)

    Just run a :

    `composer require oza/user-images-manager`
- With Laravel 5.6.x, thanks to Laravel discovering system the ServiceProvider is automatically added to your Providers
- Architecture
    ------------

    [](#architecture)

The data is represented in an array containing two fields. A "current" field that contains the currently used image and another "other" field that contains all the images that have been used.

**Eg**:

```
  array:2 [
    "current" => {#601
      +"id": "66a5ebbd-645b-4323-9792-281d6942d09c"
      +"src": "http://lorempicsum.com/futurama/255/200/210"
      +"set_at": "2018-04-29"
    }
    "others" => array:3 [
      0 => {#606
        +"id": "9cdfd187-470c-45f6-a558-387d3a8fe0e7"
        +"src": "http://lorempicsum.com/futurama/255/200/2"
        +"set_at": "2018-04-28"
      }
      1 => {#603
        +"id": "eba74758-9721-44e8-8278-e09c237016f7"
        +"src": "http://lorempicsum.com/futurama/255/200/5"
        +"set_at": "2018-04-28"
      }

    ]
  ]

```

- How to Use
    ----------

    [](#how-to-use)

    - Just Add the `UsersImagesManager` trait to your Profile Model.

    ```
