Download the PHP package daveismyname/laravel-dropbox without Composer

On this page you can find all versions of the php package daveismyname/laravel-dropbox. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-dropbox

Latest Version on Packagist Total Downloads

Logo

Community

There is a Discord community. https://discord.gg/VYau8hgwrm For quick help, ask questions in the appropriate channel.

Introduction

A Laravel package for working with Dropbox v2 API.

Dropbox API documentation can be found at: https://www.dropbox.com/developers/documentation/http/documentation

Application Register

To use Dropbox API an application needs creating at https://www.dropbox.com/developers/apps

Create a new application, select either Dropbox API or Dropbox Business API Next select the type of access needed either the app folder (useful for isolating to a single folder), or full Dropbox.

Next copy and paste the APP Key and App Secret into your .env file:

Now enter your desired redirect URL. This is the URL your application will use to connect to Dropbox API.

A common URL is https://domain.com/dropbox/connect

Install

Via Composer

Config

You can publish the config file with:

When published, the config/dropbox.php config file contains, make sure to publish this file and change the scopes to match the scopes of your Dropbox app, inside Dropbox app console.

Migration

You can publish the migration with:

php artisan vendor:publish --provider="Dcblogdev\Dropbox\DropboxServiceProvider" --tag="migrations" After the migration has been published you can create the tokens tables by running the migration:

.ENV Configuration Ensure you've set the following in your .env file:

Bypass Oauth2 You can bypass the oauth2 process by generating an access token in your dropbox app and entering it on the .env file:

Usage

Note this package expects a user to be logged in.

Note: these examples assume the authentication is using the oauth2 and not setting the access token in the .env directly.

If setting the access code directly don't rely on Dropbox::getAccessToken()

A routes example:

Or using a middleware route, if the user does not have a graph token then automatically redirect to get authenticated:

Once authenticated you can call Dropbox:: with the following verbs:

The $array is not always required, its requirement is determined from the endpoint being called, see the API documentation for more details.

The $headers are optional when used can pass in additional headers.

The $useToken is optional when set to true will use the authorisation header, defaults to true.

These expect the API endpoints to be passed, the URL https://api.dropboxapi.com/2/ is provided, only endpoints after this should be used ie:

Middleware

To restrict access to routes only to authenticated users there is a middleware route called DropboxAuthenticated

Add DropboxAuthenticated to routes to ensure the user is authenticated:

To access the token model reference this ORM model:

Files

This package provides a clean way of working with files.

To work with files first call ->files() followed by a method.

Import Namespace

List Content

list files and folders of a given path

List Content Continue

Using a cursor from the previous listContents call to paginate over the next set of folders/files.

Delete folder/file Pass the path to the file/folder, When delting a folder all child items will be deleted.

Create Folder Pass the path to the folder to be created.

Search Files Each word will used to search for files.

Upload File Upload files to Dropbox by passing the folder path followed by the filename. Note this method supports uploads up to 150MB only.

Download File Download file from Dropbox by passing the folder path including the file.

Move Folder/File Move accepts 4 params:

$fromPath - provide the path for the existing folder/file $toPath - provide the new path for the existing golder/file must start with a / $autoRename - If there's a conflict, have the Dropbox server try to autorename the file to avoid the conflict. The default for this field is false. $allowOwnershipTransfer - Allow moves by owner even if it would result in an ownership transfer for the content being moved. This does not apply to copies. The default for this field is false.

Change log

Please see the changelog for more information on what has changed recently.

Contributing

Contributions are welcome and will be fully credited.

Contributions are accepted via Pull Requests on Github.

Pull Requests

Security

If you discover any security related issues, please email [email protected] email instead of using the issue tracker.

License

license. Please see the license file for more information.


All versions of laravel-dropbox with dependencies

PHP Build Version
Package Version
Requires illuminate/support Version ^5.5|^5.6|^5.7|^5.8|^6.0|^7.0|^8.0|^9.0|^10.0|^11.0
guzzlehttp/guzzle Version ^6|^7
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package daveismyname/laravel-dropbox contains the following files

Loading the files please wait ....