PHPackages                             preprio/laravel-rest-sdk - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. preprio/laravel-rest-sdk

ActiveLibrary[HTTP &amp; Networking](/categories/http)

preprio/laravel-rest-sdk
========================

Laravel SDK for the Prepr REST API.

4.2.1(12mo ago)24.0k↓44.4%2[1 PRs](https://github.com/preprio/laravel-rest-sdk/pulls)MITPHPPHP ^8.0CI passing

Since Feb 23Pushed 3mo ago3 watchersCompare

[ Source](https://github.com/preprio/laravel-rest-sdk)[ Packagist](https://packagist.org/packages/preprio/laravel-rest-sdk)[ RSS](/packages/preprio-laravel-rest-sdk/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (1)Versions (45)Used By (0)

Laravel provider for the Prepr REST API
=======================================

[](#laravel-provider-for-the-prepr-rest-api)

This Laravel package is a provider for the Prepr REST API.

Basics
------

[](#basics)

- The SDK on [GitHub](https://github.com/preprio/laravel-rest-sdk)
- Compatible with Laravel `v5x`, `v6x`, `v7x`, `v8x`, `v9x`, `v10x`, `v11x`, `v12x`.
- Requires `GuzzleHttp 7.3.X`, and for version 3.0 and above PHP 8.x is required.

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

[](#installation)

You can install the Provider as a composer package.

For Laravel v10x, v11x and Laravel v12x

```
composer require preprio/laravel-rest-sdk:"^4.0"
```

For Laravel v9x

```
composer require preprio/laravel-rest-sdk:"^2.0"
```

For Laravel v8x

```
composer require preprio/laravel-rest-sdk:"^1.3"
```

Other versions

```
composer require preprio/laravel-rest-sdk:"1.1"
```

### Publish config

[](#publish-config)

Publish `prepr.php` config

```
php artisan vendor:publish --provider="Preprio\PreprServiceProvider"

```

Set up your .env file configuration
-----------------------------------

[](#set-up-your-env-file-configuration)

You can set the default configuration in your .env file of you Laravel project.

```
PREPR_URL=https://cdn.prepr.io/
PREPR_TOKEN={{ACCESS_TOKEN}}

```

Laravel local caching
---------------------

[](#laravel-local-caching)

To make use of the caching feature of Laravel, add the following parameters to your .env file.

```
PREPR_CACHE=true
PREPR_CACHE_TIME=1800

```

Optional options
----------------

[](#optional-options)

```
PREPR_TIMEOUT=30
PREPR_CONNECT_TIMEOUT=10

```

Making your first request
-------------------------

[](#making-your-first-request)

Let's start with getting all content items from your Prepr Environment.

```
