php-soft / laravel-photos by huytbt

Laravel Photos module
1,609
2
7
Package Data
Maintainer Username: huytbt
Maintainer Contact: huytbt@gmail.com (Huy Ta)
Package Create Date: 2015-08-03
Package Last Update: 2015-12-28
Language: PHP
License: MIT
Last Refreshed: 2024-11-14 15:07:25
Package Statistics
Total Downloads: 1,609
Monthly Downloads: 0
Daily Downloads: 0
Total Stars: 2
Total Watchers: 7
Total Forks: 1
Total Open Issues: 4

Laravel Photos Module

Build Status

1. Installation

Install via composer - edit your composer.json to require the package.

"require": {
    // ...
    "php-soft/laravel-photos": "dev-master",
}

Then run composer update in your terminal to pull it in. Once this has finished, you will need to add the service provider to the providers array in your app.php config as follows:

'providers' => [
    // ...
    PhpSoft\ArrayView\Providers\ArrayViewServiceProvider::class,
    JD\Cloudder\CloudderServiceProvider::class, // use for cloudinary driver
    PhpSoft\Photos\Providers\PhotosServiceProvider::class,
]

Next, also in the app.php config file, under the aliases array, you may want to add facades.

'aliases' => [
    // ...
    'Photo' => PhpSoft\Photos\Facades\Photo::class,
]

You will want to publish the config using the following command:

$ php artisan vendor:publish --provider="PhpSoft\Photos\Providers\PhotosServiceProvider"

# if use cloudinary driver, you need publish cloudder config as follows
$ php artisan vendor:publish --provider="JD\Cloudder\CloudderServiceProvider"

You can custom configurations in the config files!

2. Usage

Add routes in app/Http/routes.php

Route::post('/photos', '\PhpSoft\Photos\Controllers\PhotosController@upload');