PHP code example of inwave / laravel-uploadcare
1. Go to this page and download the library: Download inwave/laravel-uploadcare library . Choose the download type require .
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
inwave / laravel-uploadcare example snippets
return array(
'public_key' => 'YOUR_UPLO ADCARE_PUBLIC_KEY_HERE',
'private_key' => 'YOUR_UPLOADCARE_PRIVATE_KEY_HERE',
);
'providers' => array(
...
Illuminate\Html\HtmlServiceProvider::class,
Inwave\LaravelUploadcare\LaravelUploadcareServiceProvider::class,
);
'aliases' => array(
...
'Form' => Illuminate\Html\FormFacade::class,
'HTML' => Illuminate\Html\HtmlFacade::class,
'Uploadcare' => Inwave\LaravelUploadcare\Facades\Uploadcare::class,
);
Route::get('/demo', function(){
return View::make('demo/demo');
});
Route::post('/demo', function(){
echo Uploadcare::getFile(Input::get('image'))->getUrl();
});
<html>
<head>
<title>Uploadcare Demo</title>
</head>
<body>
<form method="POST" action="/demo">
{!! Form::uploadcare('image', null, array('data-crop' => '3:4')) !!}
<input type="submit">
</form>
{!! Uploadcare::scriptTag() !!}
</body>
</html>
js
php artisan vendor:publish