2017 © Pedro Peláez
 

library laravel-profile-image

Laravel 5 profile image system

image

hareku/laravel-profile-image

Laravel 5 profile image system

  • Sunday, August 20, 2017
  • by hareku
  • Repository
  • 2 Watchers
  • 2 Stars
  • 29 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 9 Versions
  • 38 % Grown

The README.md

Laravel 5 Profile Image System

This package helps you to add profile image system to your project.
It works if the driver supported by FileSystem. (AWS S3, Rackspace, Public disc), (*1)

Caution

  • Support Laravel 5.4~
  • Required php >=7.1

Installation

Run composer require hareku/laravel-profile-image, (*2)

Include the service provider within config/app.php., (*3)

'providers' => [
    Hareku\LaravelProfileImage\ProfileImageServiceProvider::class,
];

Publish the config file. (config/profile-image.php), (*4)

$ php artisan vendor:publish --provider="Hareku\LaravelProfileImage\ProfileImageServiceProvider"

Usage

Example config

<?php

use App\User;

return [
    User::class => [
        'extension' => 'jpg',
        'directory' => 'user-profile-images',
        'default_image_name' => 'default.jpg',
        'types' => [
            'original' => [
                'directory' => 'original',
                'size'  => null,
            ],
            'bigger' => [
                'directory' => 'bigger',
                'size'  => 73,
            ],
            'normal' => [
                'directory' => 'normal',
                'size'  => 48,
            ],
            'mini' => [
                'directory' => 'mini',
                'size'  => 24,
            ],
        ],
    ],
];

Example Contnroller

Example is here. UserProfileImageController, (*5)

Get user profile image URL list

$this->profileImage->urlSet(get_class($user), $user->id);

[
    'original' => '/storage/user-profile-images/original/1.jpg',
    'bigger' => '/storage/user-profile-images/bigger/1.jpg',
    'normal' => '/storage/user-profile-images/normal/1.jpg',
    'mini' => '/storage/user-profile-images/mini/1.jpg',
]

License

MIT, (*6)

Author

hareku (hareku908@gmail.com), (*7)

The Versions

20/08 2017
20/08 2017
20/07 2017
20/07 2017
20/07 2017

dev-hotfix/2.0.1

dev-hotfix/2.0.1

Laravel 5 profile image system

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar hareku

laravel profile image

29/06 2017
26/06 2017
26/06 2017
26/06 2017