2017 © Pedro Peláez
 

laravel-library laravel-initial-image

Laravel package to create default profile image using name of user.

image

hassanalisalem/laravel-initial-image

Laravel package to create default profile image using name of user.

  • Friday, February 17, 2017
  • by anacoder
  • Repository
  • 1 Watchers
  • 0 Stars
  • 117 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 13 % Grown

The README.md

Laravel initial Image

Laravel package to create default profile image using first two letters of a name., (*1)

Installation

Install using composer:, (*2)

composer require hassanalisalem/laravel-initial-image

Edit app/config/app.php and add the providers, (*3)

'providers' => [
    'hassanalisalem\Image\DefaultProfileImageServiceProvider'
]

Basic Usage

To create a profile image just do, (*4)

$img = \DefaultProfileImage::create("Name Surname");
\Storage::put("profile.png", $img->encode());

This will create a profile image that has 512px width&height using the first letters of name and surname., (*5)

Advanced Usage

Create a white color text over black color background profile image that has 216px width&height., (*6)

$img = \DefaultProfileImage::create("Name Surname", 256, '#000', '#FFF');
\Storage::put("profile.png", $img->encode());

Using a custom font, (*7)

$img = \DefaultProfileImage::create("@ Lamoni", 256, "#212121", "#FFF", '/var/www/public/fonts/RobotoDraftRegular.woff');
\Storage::put("profile.png", $img->encode());

The Versions

17/02 2017

dev-master

9999999-dev http://www.anacoder.net

Laravel package to create default profile image using name of user.

  Sources   Download

MIT

The Requires

 

laravel default profile image

13/12 2016

v1.0.2

1.0.2.0 http://www.anacoder.net

Laravel package to create default profile image using name of user.

  Sources   Download

MIT

The Requires

 

laravel default profile image

13/12 2016

v1.0.1

1.0.1.0 http://www.anacoder.net

Laravel package to create default profile image using name of user.

  Sources   Download

MIT

The Requires

 

laravel default profile image

13/12 2016

v1.0.0

1.0.0.0 http://www.anacoder.net

Laravel package to create default profile image using name of user.

  Sources   Download

MIT

The Requires

 

laravel default profile image