PHPackages                             itsdizzy/trakt-api - 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. itsdizzy/trakt-api

ActiveLibrary[API Development](/categories/api)

itsdizzy/trakt-api
==================

A simple library for the Trakt.tv API v2

v1.0(9y ago)2471[1 issues](https://github.com/ItsDizzy/trakt-api-laravel/issues)GPL-3.0PHPPHP &gt;=5.5.9

Since Jul 17Pushed 8y ago1 watchersCompare

[ Source](https://github.com/ItsDizzy/trakt-api-laravel)[ Packagist](https://packagist.org/packages/itsdizzy/trakt-api)[ Docs](https://github.com/ItsDizzy/trakt-api-laravel)[ RSS](/packages/itsdizzy-trakt-api/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (1)Dependencies (5)Versions (2)Used By (0)

Trakt API for Laravel 5
=======================

[](#trakt-api-for-laravel-5)

[![Latest Version on Packagist](https://camo.githubusercontent.com/50b437bab03e5d82db4c1096835ff56fa9a037f9a82386aee8e853bc1b455302/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f767072652f69747364697a7a792f7472616b742d6170692e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/itsdizzy/trakt-api)[![Software License](https://camo.githubusercontent.com/479ebf9c44ce4a5ee8f6578650f9502edbed74720dd729f68784c2810a1b2ea4/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f69747364697a7a792f7472616b742d6170692d6c61726176656c2e7376673f7374796c653d666c61742d737175617265)](LICENSE)[![Total Downloads](https://camo.githubusercontent.com/0b19cfe1a29adacdbdcc4b39314e04cb708aec460f2eccbdfdfa330c97bef3ad/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f69747364697a7a792f7472616b742d6170692e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/itsdizzy/trakt-api)

This is a library to use the [Trakt API](http://docs.trakt.apiary.io/) in Laravel 5

Setup
-----

[](#setup)

To install this library you need to use composer, you can get it from [here](https://getcomposer.org/download/).

When you have that installed which you probably already have since you already made a laravel project, you can run the following command:

```
composer require itsdizzy/trakt-api 1.0.x-dev
```

Like any laravel library you have to tell laravel how it has to use it.

To do this you have to add the service provider to the `providers` array in `config/app.php`

```
Dizzy\Trakt\TraktServiceProvider::class
```

You also have to add a facade to the `aliases` array in `config/app.php`

```
'Trakt' => Dizzy\Trakt\Facades\Trakt::class,
```

Now laravel knows which bindings it has to create and which config files it has to load, and it made a nice little alias so you can just use the `Trakt` facade in your code.

Trakt also requires at least a api key, you can get one by creating a new application [here](https://trakt.tv/oauth/applications). Now open your `.env` file and add set the `TRAKT_CLIENT_ID` with your client id

```
TRAKT_CLIENT_ID=yourclientidhere

```

Now you are all set to use the api.

Usage
-----

[](#usage)

```
