承接 enzaime/dynamic-link 相关项目开发

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

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

enzaime/dynamic-link

最新稳定版本:v1.0

Composer 安装命令:

composer require enzaime/dynamic-link

包简介

Enzaime Firebase Dynamic Link

README 文档

README

Introduction

This package is used to generate firebase dynamic link for laravel application.

Integration

Add the following repository to project's composer.json.

"repositories": [
    {
        "type": "vcs",
        "url": "https://github.com/enzaime/dynamic-link.git"
    },
    ....
],

Now, run composer require enzaime/dynamic-link command from your project terminal.

Environment Variable

Set the following credentials to .env file.

FIREBASE_URL=    //DefaultValue = https://firebasedynamiclinks.googleapis.com/v1/shortLinks
FIREBASE_DOMAIN=
FIREBASE_API_KEY=
FIREBASE_ANDROID_PACKAGE_NAME=
FIREBASE_IOS_BUNDLE_ID=

To find Firebase API key follow the below steps

  • STEP 1: Go to Firebase Console
  • STEP 2: Select your Project
  • STEP 3: Click on Settings icon and select Project Settings
  • STEP 4: Select CLOUD MESSAGING tab and Server Key is the API Key.

To set your application's Firebase Domain follow the below steps:

  • STEP 1: Go to Firebase Console
  • STEP 2: Select your Project
  • STEP 3: Look at left side menu bar
    • Engage->Dynamic Link
  • STEP 4: Use default link like your-project.page.link or set the custom domain.

Disable Link generation

Set the following environment variable to disable link generation:

DISABLE_DYNAMIC_LINK_GENERATION=true

Example

Using Facade

EnzDynamicLink::generate($linkThatYouWantToShare);

Using DynamicLink Class

$dLink = new \Enzaime\DynamicLink\DynamicLink();
$dLink->generate($linkThatYouWantToShare);

Assertion

The following assertion methods can be used for the test cases.

EnzDynamicLink::fake();
$link = 'https://enzaime.com';

EnzDynamicLink::generate($link);

EnzDynamicLink::assertGenerateMethodCalled();

EnzDynamicLink::assertGenerated($link);

EnzDynamicLink::assertNotGenerated("$link?test=not-generated");

Running Test

composer update
composer test

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-02-04