Package Data | |
---|---|
Maintainer Username: | tr0n |
Maintainer Contact: | tonioriol@gmail.com (Toni Oriol) |
Package Create Date: | 2016-10-14 |
Package Last Update: | 2016-10-15 |
Home Page: | |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-04-17 15:13:10 |
Package Statistics | |
---|---|
Total Downloads: | 278 |
Monthly Downloads: | 0 |
Daily Downloads: | 0 |
Total Stars: | 1 |
Total Watchers: | 2 |
Total Forks: | 0 |
Total Open Issues: | 0 |
A placeholder image generator.
Its framework agnostic but comes with integration for Laravel (Facade, ServiceProvider and route).
composer require t20n/holder
There's the T20n\Holder\Holder
class that has make
method that accepts height
, width
, and optionally third parameter color
in hex format.
$holder = new T20n\Holder\Holder;
$holder->make($height, $width, $color = 'A8E6CE');
$holder->response('png');
Add the service provider and alias to the config/app.php
of your laravel install:
T20n\Holder\HolderServiceProvider::class,
'Holder' => T20n\Holder\Facades\HolderFacade::class,
The Laravel Service Provider automatically declares the holder
route within ready to use, the response is a png
image of the given dimensions.
Optionally the background color of the image can be set, defaults to #CCCCCC
otherwise.
http://laravel.app/holder/640/480/A8E6CE
that is http://laravel.app/holder/{height}/{width}/{[optional]backgroundColor}