PHPackages                             labrodev/laravel-trello - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. labrodev/laravel-trello

ActiveLibrary

labrodev/laravel-trello
=======================

Stateless Trello REST API client for Laravel with the authorize-URL token flow.

00

Since Jul 19Compare

[ Source](https://github.com/labrodev/laravel-trello)[ Packagist](https://packagist.org/packages/labrodev/laravel-trello)[ RSS](/packages/labrodev-laravel-trello/feed)WikiDiscussions Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

Laravel Trello
==============

[](#laravel-trello)

Stateless Trello REST API client for Laravel with the authorize-URL token flow. You build an authorize URL, the user grants access on trello.com, Trello redirects back with a member token in the URL fragment, and every client call receives that token explicitly — the package stores nothing.

Installation
------------

[](#installation)

```
composer require labrodev/laravel-trello
```

Publish the config file:

```
php artisan vendor:publish --tag=trello-config
```

Set the environment variables:

```
TRELLO_API_KEY=your-power-up-api-key
TRELLO_APP_NAME="My App"
TRELLO_RETURN_URL=https://my-app.test/trello/callback
```

Authorize flow
--------------

[](#authorize-flow)

Build the URL and redirect the user to it. The `state` value is appended to the return URL as a query parameter, so you can verify the round-trip:

```
use Labrodev\Trello\TrelloAuthorizeUrl;

$url = new TrelloAuthorizeUrl()->build(state: $state);

return redirect()->away($url);
```

Trello redirects back to `TRELLO_RETURN_URL?state=...` with the token in the URL fragment (`#token=...`). Capture it with a small piece of frontend code, then validate it before storing:

```
use Labrodev\Trello\TrelloClient;
use Labrodev\Trello\Exceptions\TrelloAuthFailed;

$trelloClient = new TrelloClient();

try {
    $trelloMember = $trelloClient->member(token: $token);
} catch (TrelloAuthFailed) {
    // token invalid — reject it
}
```

Client calls
------------

[](#client-calls)

Every method takes the member token first; the API key falls back to `config('trello.key')` unless passed as the last argument.

```
use Labrodev\Trello\TrelloClient;

$trelloClient = new TrelloClient();

$trelloMember = $trelloClient->member(token: $token);          // TrelloMember (id, username, fullName)
$trelloBoards = $trelloClient->boards(token: $token);          // list (open boards)
$trelloLists = $trelloClient->lists(token: $token, boardId: $boardId); // list

$cardId = $trelloClient->createCard(
    token: $token,
    listId: $listId,
    name: 'Card title',
    description: 'Card description',
);

$trelloClient->archiveCard(token: $token, cardId: $cardId);
$trelloClient->revokeToken(token: $token); // best-effort — safe to catch and ignore
```

Exceptions
----------

[](#exceptions)

- `Labrodev\Trello\Exceptions\TrelloAuthFailed` — Trello returned 401/403, or no API key is available.
- `Labrodev\Trello\Exceptions\TrelloRequestFailed` — any other failed request.

Both carry fixed messages only. Trello credentials travel in query strings, so no URL, token, key, or response body is ever interpolated into an exception message.

Testing
-------

[](#testing)

```
composer test      # pest
composer phpstan   # larastan, level 7
composer pint      # laravel preset
composer check     # all of the above
```

License
-------

[](#license)

MIT. See [LICENSE.md](LICENSE.md).

###  Health Score

9

—

LowBetter than 0% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity0

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity11

Early-stage or recently created project

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/151143718?v=4)[Lashyn Petro ](/maintainers/labrodev)[@labrodev](https://github.com/labrodev)

### Embed Badge

![Health badge](/badges/labrodev-laravel-trello/health.svg)

```
[![Health](https://phpackages.com/badges/labrodev-laravel-trello/health.svg)](https://phpackages.com/packages/labrodev-laravel-trello)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
