承接 laravolt/metabase 相关项目开发

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

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

laravolt/metabase

最新稳定版本:0.4.2

Composer 安装命令:

composer require laravolt/metabase

包简介

Embed Metabase dashboard and question in your application

README 文档

README

Blade component to embed metabase dashboard or question in your website. For more information about Metabase, please visit Metabase official website.

Installation

composer require laravolt/metabase

Add following entries to config/services.php:

'metabase' => [
    'url' => env('METABASE_URL'),
    'secret' => env('METABASE_SECRET'),
],

And finally, update your .env file:

METABASE_URL=https://metabase.example.com
METABASE_SECRET=secret

Metabase secret key can be found in metabase settings page (only accessible by admin).

Visit https://www.metabase.com/docs/latest/administration-guide/13-embedding.html for more information.

Usage

<!-- embed dashboard -->
<x-metabase dashboard="1"></x-metabase>

<!-- embed question -->
<x-metabase question="2"></x-metabase>

<!-- passing html attributes -->
<x-metabase question="2" width="80%" height="500px"></x-metabase>

<!-- passing metabase parameters -->
@php($params = ['category' => 'php'])
<x-metabase dashboard="1" :params="$params"></x-metabase> 
// BEWARE of the colon in ":params" (not "param") because we are passing array variable directly to the component
 
<!-- passing additional metabase parameters -->
<x-metabase dashboard="1" :params="$params" :bordered="false" titled theme="night"></x-metabase>

Common Problems

Embedding is not enabled for this object.

Solution: https://www.metabase.com/learn/embedding/embedding-charts-and-dashboards

Not found.

Invalid dashboard or question ID.

Message seems corrupt or manipulated.

Invalid secret key.

统计信息

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

GitHub 信息

  • Stars: 27
  • Watchers: 3
  • Forks: 8
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-12-14