PHPackages                             namelivia/laravel-fitbit - 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. namelivia/laravel-fitbit

AbandonedArchivedLibrary[API Development](/categories/api)

namelivia/laravel-fitbit
========================

A Fitbit web api library for Laravel

0.0.7(4y ago)42533[1 issues](https://github.com/namelivia/laravel-fitbit/issues)MITPHPPHP ^7.3|^8.0

Since Sep 20Pushed 2y ago1 watchersCompare

[ Source](https://github.com/namelivia/laravel-fitbit)[ Packagist](https://packagist.org/packages/namelivia/laravel-fitbit)[ RSS](/packages/namelivia-laravel-fitbit/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependencies (9)Versions (9)Used By (0)

laravel-fitbit [![tag](https://camo.githubusercontent.com/e55cb7b98aeccd1cc921100271eec026b74444e32c28486c7a90a1ccfec423e6/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f7461672f6e616d656c697669612f6c61726176656c2d6669746269742e737667)](https://github.com/namelivia/laravel-fitbit/releases) [![Build Status](https://camo.githubusercontent.com/bf62c047ba6a1e5201d81a2dcf34995dd9e3d3cba63fab5f14f6df78347025e0/68747470733a2f2f7472617669732d63692e6f72672f6e616d656c697669612f6c61726176656c2d6669746269742e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/namelivia/laravel-fitbit) [![codecov](https://camo.githubusercontent.com/060804afb259cf86c17e58482cc7d6cff3740b3acd2b2fe08689ca0ce2b2100b/68747470733a2f2f636f6465636f762e696f2f67682f6e616d656c697669612f6c61726176656c2d6669746269742f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/namelivia/laravel-fitbit) [![StyleCI](https://camo.githubusercontent.com/337cb2d12b455a7e5ac6c17983f9832c99034bcde749eb8d31a660ef2f4bd9d0/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3139393832313835382f736869656c643f6272616e63683d6d6173746572)](https://github.styleci.io/repos/199821858)
============================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#laravel-fitbit----)

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

[](#installation)

Require this package, with [Composer](https://getcomposer.org/), in the root directory of your project.

```
$ composer require namelivia/laravel-fitbit
```

Add the service provider to `config/app.php` in the `providers` array. If you're using Laravel 5.5 or greater, there's no need to do this.

```
Namelivia\Fitbit\Laravel\FitbitServiceProvider::class
```

If you want you can use the [facade](http://laravel.com/docs/facades). Add the reference in `config/app.php` to your aliases array.

```
'Fitbit' => Namelivia\Fitbit\Laravel\Facades\Fitbit::class
```

Configuration
-------------

[](#configuration)

Laravel Fitbit requires connection configuration. To get started, you'll need to publish all vendor assets:

```
$ php artisan vendor:publish --provider="Namelivia\Fitbit\Laravel\FitbitServiceProvider"
```

This will create a `config/fitbit.php` file in your app that you can modify to set your configuration. Also, make sure you check for changes to the original config file in this package between releases.

#### Default Connection Name

[](#default-connection-name)

This option `default` is where you may specify which of the connections below you wish to use as your default connection for all work. Of course, you may use many connections at once using the manager class. The default value for this setting is `main`.

#### Fitbit Connections

[](#fitbit-connections)

This option `connections` is where each of the connections are setup for your application. Example configuration has been included, but you may add as many connections as you would like.

Usage
-----

[](#usage)

#### FitbitManager

[](#fitbitmanager)

This is the class of most interest. It is bound to the ioc container as `fitbit` and can be accessed using the `Facades\Fitbit` facade. This class implements the ManagerInterface by extending AbstractManager. The interface and abstract class are both part of [Graham Campbell's](https://github.com/GrahamCampbell) [Laravel Manager](https://github.com/GrahamCampbell/Laravel-Manager) package, so you may want to go and checkout the docs for how to use the manager class over at that repository. Note that the connection class returned will always be an instance of `Api`.

#### Facades\\Fitbit

[](#facadesfitbit)

This facade will dynamically pass static method calls to the `fitbit` object in the ioc container which by default is the `FitbitManager` class.

#### FitbitServiceProvider

[](#fitbitserviceprovider)

This class contains no public methods of interest. This class should be added to the providers array in `config/app.php`. This class will setup ioc bindings.

### Examples

[](#examples)

Here you can see an example of just how simple this package is to use. Out of the box, the default adapter is `main`. After you enter your authentication details in the config file, it will just work:

```
// You can alias this in config/app.php.
use Namelivia\Fitbit\Laravel\Facades\Fitbit;

Fitbit::activities()->activity()->getLifetimeStats();
// We're done here - how easy was that, it just works!
```

The Fitbit manager will behave like it is a `Fitbit`. If you want to call specific connections, you can do that with the connection method:

```
use Namelivia\Fitbit\Laravel\Facades\Fitbit;

// Writing this…
Fitbit::connection('main')->activities()->activity()->getLifetimeStats();

// …is identical to writing this
Fitbit::activities()->activity()->getLifetimeStats();

// and is also identical to writing this.
Fitbit::connection()->activities()->activity()->getLifetimeStats();

// This is because the main connection is configured to be the default.
Fitbit::getDefaultConnection(); // This will return main.

// We can change the default connection.
Fitbit::setDefaultConnection('alternative'); // The default is now alternative.
```

If you prefer to use dependency injection over facades like me, then you can inject the manager:

```
use Namelivia\Fitbit\Laravel\FitbitManager;

class Foo
{
    protected $fitbit;

    public function __construct(FitbitManager $fitbit)
    {
        $this->fitbit = $fitbit;
    }

    public function bar()
    {
        $this->fitbit->activities()->activity()->getLifetimeStats();
    }
}

App::make('Foo')->bar();
```

Documentation
-------------

[](#documentation)

This is package is a Laravel wrapper of [fitbit-http-php](https://github.com/namelivia/fitbit-http-php).

License
-------

[](#license)

[MIT](LICENSE)

Local development
-----------------

[](#local-development)

This project comes with a `docker-compose.yml` file so if you use Docker and docker-compose you can develop without installing anything on your local environment. Just run `docker-compose up --build` for the first time to setup the container and launch the tests. PHPUnit is configured as the entrypoint so just run `docker-compose up` everytime you want the tests to execute on the Dockerized PHP development container.

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance15

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 57.4% 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 ~114 days

Recently: every ~130 days

Total

7

Last Release

1788d ago

PHP version history (4 changes)0.0.1PHP ^7.0

0.0.2PHP ^7.1

0.0.6PHP ^7.3

0.0.7PHP ^7.3|^8.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1571416?v=4)[José Ignacio Amelivia Santiago](/maintainers/namelivia)[@namelivia](https://github.com/namelivia)

---

Top Contributors

[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (66 commits)")[![dependabot-preview[bot]](https://avatars.githubusercontent.com/in/2141?v=4)](https://github.com/dependabot-preview[bot] "dependabot-preview[bot] (35 commits)")[![namelivia](https://avatars.githubusercontent.com/u/1571416?v=4)](https://github.com/namelivia "namelivia (11 commits)")[![Olindn](https://avatars.githubusercontent.com/u/2814277?v=4)](https://github.com/Olindn "Olindn (2 commits)")[![kevinpurwito](https://avatars.githubusercontent.com/u/11625012?v=4)](https://github.com/kevinpurwito "kevinpurwito (1 commits)")

---

Tags

laravelfitbit

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/namelivia-laravel-fitbit/health.svg)

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

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M337](/packages/psalm-plugin-laravel)[laravel/horizon

Dashboard and code-driven configuration for Laravel queues.

4.2k95.4M284](/packages/laravel-horizon)[laravel/ai

The official AI SDK for Laravel.

1.0k3.2M169](/packages/laravel-ai)[nuwave/lighthouse

A framework for serving GraphQL from Laravel

3.5k11.8M113](/packages/nuwave-lighthouse)[laravel/mcp

Rapidly build MCP servers for your Laravel applications.

77022.3M131](/packages/laravel-mcp)[defstudio/telegraph

A laravel facade to interact with Telegram Bots

815320.5k3](/packages/defstudio-telegraph)

PHPackages © 2026

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