Laravel

Laravel

Integrate with your Laravel application

View integration

You can easily integrate Previewify with your Laravel application, simply install the package composer require flowframe/laravel-previewify, obtain an API token and add it to your .env.

# .env
PREVIEWIFY_API_TOKEN=<YOUR_API_TOKEN>
// web.php

Route::get('/example', function() {
    $image = app(\Flowframe\Previewify\Previewify::class)->signedImageUrl(templateId: 1, fields: [
        'previewify:title' => 'Hello from Laravel',
        'previewify:cta' => 'Get Started',
    ]);

    return view('example', [
        'image' => $image,
    ]);
});
// example.blade.php

<meta property="og:image" content="{{ $image }}" />

<meta name="twitter:image" content="{{ $image }}" />