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

ActiveLibrary

previewlinks/laravel-previewlinks
=================================

The official Laravel client for PreviewLinks.io

v0.5.0(2y ago)01.2k[3 PRs](https://github.com/PreviewLinks/laravel-previewlinks/pulls)MITPHPPHP ^8.0

Since Dec 9Pushed 2y ago1 watchersCompare

[ Source](https://github.com/PreviewLinks/laravel-previewlinks)[ Packagist](https://packagist.org/packages/previewlinks/laravel-previewlinks)[ Docs](https://github.com/PreviewLinks/laravel-previewlinks)[ GitHub Sponsors](https://github.com/larsklopstra)[ RSS](/packages/previewlinks-laravel-previewlinks/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (12)Versions (9)Used By (0)

PreviewLinks for Laravel
========================

[](#previewlinks-for-laravel)

This is the official [PreviewLinks](https://previewlinks.io) client for Laravel.

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

[](#installation)

You can install the package via Composer:

```
composer require previewlinks/laravel-previewlinks
```

Usage
-----

[](#usage)

### Configuration

[](#configuration)

You can set an API token in your `.env` by using `PREVIEWLINKS_API_TOKEN`.

```
return [

    /**
     * PreviewLinks API token
     *
     * Obtain one from https://previewlinks.io/app/account
     */
    'api_token' => env('PREVIEWLINKS_API_TOKEN'),

];
```

### Methods

[](#methods)

```
use PreviewLinks\PreviewLinks;

/** @var PreviewLinks $previewlinks */
$previewlinks = app(PreviewLinks::class);

$sites = $previewlinks->listSites();

$site = $previewlinks->showSite(siteId: 1);

$siteTemplates = $previewlinks->listSiteTemplates(siteId: 1);

// This will return a JSON response with the image URL, the request may take 4 to 8 seconds to complete
$downloadableImageUrl = $previewlinks->downloadImage(siteId: 1, templateId: 1, fields: [
    'previewlinks:title' => 'Hello from Laravel',
    'previewlinks:cta' => 'This is an example',
]);

// This method makes no API requests, we advise to use this over `downloadImage`
$signedImageUrl = $previewlinks->signedImageUrl(templateId: 1, [
    'previewlinks:title' => 'Hello from Laravel',
    'previewlinks:cta' => 'This is an example',
]);
```

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Logan Craft](https://github.com/craftlogan)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~255 days

Total

3

Last Release

740d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/540a15b2b5d2f3b86115f238f597f4fe2018470f2d6e9343ffd5eabbcd5bd447?d=identicon)[CraftLogan](/maintainers/CraftLogan)

---

Top Contributors

[![CraftLogan](https://avatars.githubusercontent.com/u/10950466?v=4)](https://github.com/CraftLogan "CraftLogan (7 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (7 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (7 commits)")[![Larsklopstra](https://avatars.githubusercontent.com/u/25669876?v=4)](https://github.com/Larsklopstra "Larsklopstra (4 commits)")

---

Tags

laravelFlowframelaravel-previewifyPreviewLinksCraft Enterpriseslaravel-previewlinks

###  Code Quality

TestsPest

### Embed Badge

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

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

###  Alternatives

[vormkracht10/laravel-mails

Laravel Mails can collect everything you might want to track about the mails that has been sent by your Laravel app.

24149.7k](/packages/vormkracht10-laravel-mails)[spatie/laravel-prometheus

Export Laravel metrics to Prometheus

2651.3M6](/packages/spatie-laravel-prometheus)[hydrat/filament-table-layout-toggle

Filament plugin adding a toggle button to tables, allowing user to switch between Grid and Table layouts.

6292.3k1](/packages/hydrat-filament-table-layout-toggle)[scalar/laravel

Render your OpenAPI-based API reference

6183.9k2](/packages/scalar-laravel)[ralphjsmit/laravel-helpers

A package containing handy helpers for your Laravel-application.

13704.6k2](/packages/ralphjsmit-laravel-helpers)[musahmusah/laravel-multipayment-gateways

A Laravel Package that makes implementation of multiple payment Gateways endpoints and webhooks seamless

852.2k1](/packages/musahmusah-laravel-multipayment-gateways)

PHPackages © 2026

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