承接 bndwgn/laravel-bandwagon 相关项目开发

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

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

bndwgn/laravel-bandwagon

最新稳定版本:v0.4.2

Composer 安装命令:

composer require bndwgn/laravel-bandwagon

包简介

Social proof package for Laravel

关键字:

README 文档

README

preview

This is a Laravel package to help promote social proof and legitimacy within your application. With a simple blade component added to any page you can share with potential customers or users that other customers are using and/or paying for your product. A simple pop-up will display in the corner of page with information such as "Someone from New York purchased the business plan 2 minutes ago."

Full documentation can be found at laravelbandwagon.com

Getting Started

Installation

You can install this package via composer using:

composer require bndwgn/laravel-bandwagon

The package will automatically register its service provider. To publish the config file to config/bandwagon.php run:

php artisan vendor:publish --provider="Bndwgn\Bandwagon\BandwagonServiceProvider"

Rendering the component

To render the component just add the component to any or all desired pages like so:

thumb

<x-bandwagon-renderer />

Publishing an event to users

To use the example of sharing a purchase with people who are on the purchase page of your application you would just add the following:

// App/Http/Controllers/PurchaseController.php 
use Bndwgn\Bandwagon\Bandwagon;

public function purchase(Request $request, Product $product)
{
    $user = Auth::user(); 
    // ... logic to charge a customer
    Bandwagon::createEvent(
        "Someone from ${$user->state}",
        "Purchased the ${$product->displayName} plan",
        $request->ip(),
        route('purchase', $product->id)
    ); 
}

This will create a new Bandwagon record which then any users who are on the purchase page where you render the component (<x-bandwagon-renderer />) will see.

Credits

License

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

统计信息

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

GitHub 信息

  • Stars: 112
  • Watchers: 5
  • Forks: 14
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-12-19