Download the PHP package cleargoal/laravel-deepl without Composer

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

Laravel DeepL Translation

Latest Version on Packagist Total Downloads

A Laravel package for DeepL translation with advanced features:

Requirements

Installation

Install the package via Composer:

Publish Configuration

Publish the configuration file:

This creates config/deepl.php where you can customize package behavior.

Publish and Run Migration

Publish the migration:

Run the migration to create the platform_settings table:

Configuration

Add Your First API Key

Add your DeepL API key using the artisan command:

Parameters:

That's it! The key is now stored in the database and ready to use.

Optional: Customize Storage

If you want to use a different table or key name, add to your .env:

Usage

Basic Translation

Translate text from one language to another:

Translate to All Languages

Translate text to all supported languages at once:

Language Detection

Automatically detect the language of text:

Using Dependency Injection

You can also inject the service directly:

Managing API Keys

The package provides artisan commands for easy key management.

Important: To increase your total quota, each API key must be from a different DeepL account. Multiple keys from the same account share the same quota and won't increase your limit. Create separate DeepL Free accounts (different emails) to get 500,000 characters per account per month.

Add a New Key

List All Keys

This displays a table with all keys, showing:

Tip: Use --show-keys to display full API keys (be careful in shared environments).

Check Quota

Check all keys:

Check a specific key:

Remove a Key

The command will ask for confirmation. Use --force to skip confirmation.

Advanced: Programmatic API

If you're building an admin panel or need programmatic access, you can use the DeepLApiKeyManager service directly:

Filament Admin Panel Integration

If you're using Filament in your Laravel application, the package automatically provides a beautiful admin interface for managing DeepL API keys.

Installation

The Filament integration is automatically enabled when Filament is detected in your application. No additional configuration required!

If you don't have Filament yet:

Features

Once Filament is installed, you'll find a new "DeepL API Keys" page in your admin panel under the "Settings" navigation group. The interface provides:

Key Management:

Quota Monitoring:

Security:

Customization

Navigation Group: The page appears under "Settings" by default. To change this, publish the views:

Then edit resources/views/vendor/laravel-deepl/filament/pages/manage-deepl-keys.blade.php.

You can also extend the ManageDeepLKeys class in your own Filament panel:

Access Control: Use Filament's built-in policy system to restrict access:

Screenshots

The Filament interface provides:

No Filament? No Problem!

If you don't use Filament, the artisan commands provide full functionality via CLI. The Filament integration is completely optional and adds zero overhead if not installed.

Handling Quota Exhaustion

When all API keys are exhausted, the package fires a Laravel event that you can listen to:

Option 1: Event Listener

Create an event listener:

Register the listener in EventServiceProvider:

Option 2: Configuration Callback

Set a callback in config/deepl.php:

Supported Languages

To add more languages, you can extend the $deeplCodes array in DeepLTranslationService.

How It Works

Automatic Key Rotation

The package automatically rotates between multiple API keys based on remaining quota:

  1. Keys are sorted by remaining quota (most available first)
  2. Each translation attempt tries keys in order
  3. If a key's quota is exceeded, the next key is tried automatically
  4. Character usage is tracked locally to minimize API calls

Note: Each API key must be from a different DeepL account. Keys from the same account share quota, so create separate free accounts (using different email addresses) to multiply your translation capacity. For example, 3 accounts = 1,500,000 characters/month (3 × 500,000).

Smart Caching

API keys are cached for 5 minutes to reduce database queries while still allowing dynamic updates.

Renewal Day Tracking

Each API key has a renewal_day (1-31) indicating when DeepL resets its monthly quota. The package uses this to:

Testing

The package includes comprehensive tests. To run them:

For test coverage:

For static analysis:

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

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

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of laravel-deepl with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1|^8.2|^8.3
illuminate/support Version ^10.0|^11.0|^12.0
illuminate/database Version ^10.0|^11.0|^12.0
illuminate/http Version ^10.0|^11.0|^12.0
illuminate/cache Version ^10.0|^11.0|^12.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 cleargoal/laravel-deepl contains the following files

Loading the files please wait ...