Download the PHP package purusottampanta/laravel-gdrive-backup without Composer

On this page you can find all versions of the php package purusottampanta/laravel-gdrive-backup. 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-gdrive-backup

Google Drive Backup for Laravel

Automatic, config-driven backups of your Eloquent models to a personal Google Drive account (OAuth2, not a service account):

Requirements

Installation

Laravel's package auto-discovery registers Puru\GdriveBackup\Providers\BackupServiceProvider automatically — no manual provider registration needed.

Publish the config file:

This creates config/backup.php in your app. Migrations for the database queue (jobs, job_batches, failed_jobs tables) and the OAuth routes are auto-loaded by the package — you don't need to publish them unless you want to customize them, in which case:

Configuration

Everything lives in config/backup.php and environment variables.

The single on/off switch

Set BACKUP_ENABLED=false in any environment (e.g. local, staging, a throwaway QA box) and:

Flip it back to true and everything re-attaches on the next request/deploy — no code changes required.

Registering your models

Add or remove entries here per project — nothing else needs to change. Optionally implement the marker interface for type clarity:

Google OAuth setup

  1. In Google Cloud Console, create an OAuth 2.0 Client ID (type "Web application") with scope https://www.googleapis.com/auth/drive.file and the redirect URI from GOOGLE_DRIVE_REDIRECT_URI above.
  2. Restrict routes/backup.php's auth middleware (or add your own gate) so only a trusted operator can authorize/re-authorize access — completing the flow grants Drive access under their personal account.
  3. Visit /backup/google/redirect while logged in as that operator and complete Google's consent screen.
  4. The resulting token is encrypted (Laravel Crypt, so it's tied to your APP_KEY) and stored at storage/app/google/oauth.enc — never in the database. It refreshes itself automatically thereafter.

Running it

Manual commands:

Testing

The package ships with a full PHPUnit + Orchestra Testbench suite that never touches the real Google API — all Drive calls go through an in-memory fake (tests/Support/FakeGoogleDriveClient.php), and OAuth HTTP calls are covered separately using Laravel's Http::fake().

What's covered:

Run this before every tag/release, and definitely before your first composer require your-vendor/gdrive-backup in a real project.

Publishing this package yourself

To ship this under your own name on GitHub + Packagist:

  1. Rename the Puru\GdriveBackup namespace throughout src/ (and in composer.json's autoload.psr-4 / extra.laravel.providers) to your own vendor namespace, e.g. YourOrg\GdriveBackup.
  2. Update composer.json's name field to your-vendor/gdrive-backup and the authors block.
  3. git init, commit, push to a new GitHub repo named to match (e.g. your-vendor/gdrive-backup).
  4. Tag a release: git tag v1.0.0 && git push --tags.
  5. On packagist.org, "Submit" the GitHub repo URL. Enable the GitHub Service Hook (Packagist prompts for this) so new tags auto-publish.
  6. In any project: composer require your-vendor/gdrive-backup.

For private/internal use without Packagist, add a VCS repository entry to the consuming project's composer.json instead:

License

MIT


All versions of laravel-gdrive-backup with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
guzzlehttp/guzzle Version ^7.2
illuminate/support Version ^10.0
illuminate/database Version ^10.0
illuminate/console Version ^10.0
illuminate/http Version ^10.0
illuminate/routing Version ^10.0
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 purusottampanta/laravel-gdrive-backup contains the following files

Loading the files please wait ...