Dropbox driver for Laravel.
- PHP 7.0+
If you're still on 5.6, you can just use the 1.x version.
composer require benjamincrozat/laravel-dropbox-driver
In your config/app.php
, add the service provider:
'providers' => [
BC\Laravel\DropboxDriver\ServiceProvider::class,
],
Next, add the following in app/filesystems.php
:
'disks' => [
'dropbox' => [
'driver' => 'dropbox',
'app_secret' => env('DROPBOX_APP_SECRET'),
'token' => env('DROPBOX_TOKEN'),
],
],
Then, in your .env
file:
DROPBOX_APP_SECRET=your_app_secret_key
DROPBOX_TOKEN=your_access_token
done try now
Storage::disk('dropbox')->put('file.txt', 'Welcome Hello laravel');
Storage::disk('dropbox')->delete('file.txt');
if (strlen((string) PHP_INT_MAX) < 1) {
}
Dealing with Dropbox for the first time? Here's the link to create your first application and generate your app secret key and access token.