PHPackages                             wedocreatives/toggl - 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. [API Development](/categories/api)
4. /
5. wedocreatives/toggl

ActiveLibrary[API Development](/categories/api)

wedocreatives/toggl
===================

Custom PHP library to connect with the Toggl API - Fork of ixudra/toggl

0.6.0(6y ago)07MITPHPPHP &gt;=5.6.0

Since Mar 3Pushed 6y agoCompare

[ Source](https://github.com/wedocreatives/toggl)[ Packagist](https://packagist.org/packages/wedocreatives/toggl)[ Docs](http://ixudra.be)[ RSS](/packages/wedocreatives-toggl/feed)WikiDiscussions master Synced yesterday

READMEChangelog (1)Dependencies (3)Versions (8)Used By (0)

wedocreatives/toggl
===================

[](#wedocreativestoggl)

### Fork of ixudra/toggl

[](#fork-of-ixudratoggl)

[![Latest Version on Packagist](https://camo.githubusercontent.com/d02cb6c93534d8e894b78e5d413894d90634a43bdaa05d1beaa80d0ae4f36093/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6978756472612f746f67676c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ixudra/toggl)![license](https://camo.githubusercontent.com/1f97237556e142c67d9320459ec94b3970b085aaf027c67605b0a138e20cb364/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6978756472612f746f67676c2e737667)[![StyleCI](https://camo.githubusercontent.com/e0377ed0779f40be28b6590fce5f7c57715ad9e0ad08214810ed806fc5cd749c/68747470733a2f2f7374796c6563692e696f2f7265706f732f38333835303033342f736869656c64)](https://styleci.io/repos/83850034)[![Total Downloads](https://camo.githubusercontent.com/da968beff159f0655bc89ac8077947d43e5f367f84e686f00917d289a4af86dc/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6978756472612f746f67676c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ixudra/toggl)

Custom PHP library to connect with the Toggl API - developed by [Ixudra](http://ixudra.be).

This package can be used by anyone at any given time, but keep in mind that it is optimized for my personal custom workflow. It may not suit your project perfectly and modifications may be in order.

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

[](#installation)

Pull this package in through Composer.

```
    {
        "require": {
            "wedocreatives/toggl": "0.*"
        }
    }
```

### Laravel Integration

[](#laravel-integration)

Add the service provider to your `config/app.php` file

```
    'providers'         => array(

        //...
        Wedocreatives\Toggl\TogglServiceProvider::class,

    )
```

Add the facade to your `config/app.php` file:

```
    'aliases'           => array(

        //...
        'Toggl'         => Wedocreatives\Toggl\Facades\Toggl::class,

    ),
```

Add workspace ID and your personal API token to your `.env` file:

```

TOGGL_WORKSPACE=123
TOGGL_TOKEN=your_toggl_api_token

```

Add the following lines of code to your `config/services.php` file:

```
    'toggl' => [
        'workspace'     => env('TOGGL_WORKSPACE'),
        'token'         => env('TOGGL_TOKEN'),
    ],
```

> Currently, the package only supports one workspace, which will be sufficient for most users. You can override this behaviour by using the `Config::set('services.toggl.workspace', 456)` method. Support for multiple workspaces will be added in the near future.

### Lumen 5.\* integration

[](#lumen-5-integration)

In your `bootstrap/app.php`, make sure you've un-commented the following line (around line 26):

```
$app->withFacades();

```

Then, register your class alias:

```
class_alias('Wedocreatives\Toggl\Facades\Toggl', 'Toggl');

```

Finally, you have to register your ServiceProvider (around line 70-80):

```
/*
|--------------------------------------------------------------------------
| Register Service Providers
|--------------------------------------------------------------------------
|
| Here we will register all of the application's service providers which
| are used to bind services into the container. Service providers are
| totally optional, so you are not required to uncomment this line.
|
*/

// $app->register('App\Providers\AppServiceProvider');

// Package service providers
$app->register(Wedocreatives\Toggl\TogglServiceProvider::class);

```

### Integration without Laravel

[](#integration-without-laravel)

Create a new instance of the `TogglService` where you would like to use the package:

```
    $workspaceId = 123;
    $apiToken = 'your_toggl_api_token';
    $togglService = new \Wedocreatives\Toggl\TogglService( $workspaceId, $apiToken );
```

Usage
-----

[](#usage)

The package provides an easy interface for sending requests to the Toggl API. For the full information regarding the API, all available methods and all possible parameters, I would refer you to the official Toggl API documentation on [Github](https://github.com/toggl/toggl_api_docs). The package provides a (nearly) exact match of (almost) all of functions that are described in the API documentation. The exact function definitions can be found in the `src/Traits` directory.

For your convenience, the package will automatically add several required parameters so you don't have to worry about doing so. These parameters include the workspace ID and the API token. These parameters should not be included in any of the requests. Additionally, the package also provides several utility methods for the

### Laravel usage

[](#laravel-usage)

```
    // Return an overview of what users in the workspace are doing and have been doing
    $response = Toggl::dashboard();

    // Create a client
    $response = Toggl::createClient( array( "name" => "Test company" ) ) );

    // Get a summary information of this month for all user
    $response = Toggl::summaryThisMonth();

    // Get a summary information of last month for one specific user
    $response = Toggl::summaryLastMonth( array( 'user_ids' => '123' ) ) );
```

### Non-laravel usage

[](#non-laravel-usage)

```
    $workspaceId = 123;
    $apiToken = 'your_toggl_api_token';
    $togglService = new \Wedocreatives\Toggl\TogglService( $workspaceId, $apiToken );

    // Return an overview of what users in the workspace are doing and have been doing
    $response = $togglService->dashboard();

    // Create a client
    $response = $togglService->createClient( array( "name" => "Test company" ) ) );

    // Get a summary information of this month for all user
    $response = $togglService->summaryThisMonth();

    // Get a summary information of last month for one specific user
    $response = $togglService->summaryLastMonth( array( 'user_ids' => '123' ) ) );
```

Planning
--------

[](#planning)

- Add missing API methods
- Improve usability of existing API methods
- Add additional convenience method
- Update and improve documentation
- Support for multiple workspaces

License
-------

[](#license)

This package is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT)

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 63.6% of commits — single point of failure

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.

###  Release Activity

Cadence

Every ~136 days

Recently: every ~174 days

Total

7

Last Release

2542d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0a4bd220959e6df7b2490936bfd02176021eed4930b786495ac6aa36456e3936?d=identicon)[rub3n88](/maintainers/rub3n88)

---

Top Contributors

[![elimentz](https://avatars.githubusercontent.com/u/1410811?v=4)](https://github.com/elimentz "elimentz (14 commits)")[![rub3n88](https://avatars.githubusercontent.com/u/12558611?v=4)](https://github.com/rub3n88 "rub3n88 (4 commits)")[![Ruitjes](https://avatars.githubusercontent.com/u/26769441?v=4)](https://github.com/Ruitjes "Ruitjes (2 commits)")[![danieljimeneznz](https://avatars.githubusercontent.com/u/13009825?v=4)](https://github.com/danieljimeneznz "danieljimeneznz (1 commits)")[![danielroe](https://avatars.githubusercontent.com/u/28706372?v=4)](https://github.com/danielroe "danielroe (1 commits)")

---

Tags

apilaravelIxudratoggl

### Embed Badge

![Health badge](/badges/wedocreatives-toggl/health.svg)

```
[![Health](https://phpackages.com/badges/wedocreatives-toggl/health.svg)](https://phpackages.com/packages/wedocreatives-toggl)
```

###  Alternatives

[andreaselia/laravel-api-to-postman

Generate a Postman collection automatically from your Laravel API

1.0k586.2k3](/packages/andreaselia-laravel-api-to-postman)[mollie/laravel-mollie

Mollie API client wrapper for Laravel &amp; Mollie Connect provider for Laravel Socialite

3624.1M28](/packages/mollie-laravel-mollie)[ixudra/toggl

Custom PHP library to connect with the Toggl API - developed by Ixudra

27115.5k1](/packages/ixudra-toggl)[api-ecosystem-for-laravel/dingo-api

A RESTful API package for the Laravel and Lumen frameworks.

3121.5M10](/packages/api-ecosystem-for-laravel-dingo-api)[smodav/mpesa

M-Pesa API implementation

16363.7k1](/packages/smodav-mpesa)[essa/api-tool-kit

set of tools to build an api with laravel

52680.5k](/packages/essa-api-tool-kit)

PHPackages © 2026

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