PHP code example of flixtechs-labs / laravel-bytepoint

1. Go to this page and download the library: Download flixtechs-labs/laravel-bytepoint 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/ */

    

flixtechs-labs / laravel-bytepoint example snippets



$file = $request->file('image');

$file->bytepoint([
	'type' => 'jpeg'
])
 ->store('avatars');


return [
    'token' => env('BYTEPOINT_TOKEN', ''),
    'url' => env('BYTEPOINT_URL', ''),
];

$request->file('image')->bytepoint(['type' => 'resulting type'])->store('avatars');

use  FlixtechsLabs\Bytepoint\Facades\Bytepoint;

Bytepoint::optimize($filePath, $destinationPath, $fileName = '', $options = []);

bash
php artisan vendor:publish --tag="laravel-bytepoint-config"