承接 previewlinks/laravel-previewlinks 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

previewlinks/laravel-previewlinks

最新稳定版本:v0.5.0

Composer 安装命令:

composer require previewlinks/laravel-previewlinks

包简介

The official Laravel client for PreviewLinks.io

README 文档

README

This is the official PreviewLinks client for Laravel.

Installation

You can install the package via Composer:

composer require previewlinks/laravel-previewlinks

Usage

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

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

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.

统计信息

  • 总下载量: 1.17k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-12-09

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固