Bandwagon is a Social Proof Package for Laravel


January 5th, 2021

Bandwagon is a Social Proof Package for Laravel

Laravel Bandwagon is a package to help promote social proof and legitimacy within your application. You can let users of your application know when others’ share, purchase, subscribe, or donate, for example:

Using blade and Vue, here’s how easy it is to feed data into the social proof component, which is then displayed in the user’s browser via polling:

1use Bndwgn\Bandwagon\Bandwagon;
3public function purchase(Request $request, Product $product)
5 $user = Auth::user();
6 // ... logic to charge a customer
7 Bandwagon::createEvent(
8 "Someone from ${$user->state}",
9 "Purchased the ${$product->displayName} plan",
10 $request->ip()
11 );

In your blade template (i.e., on your product page), you render the widget by using the provided blade component:

1<x-bandwagon-renderer />

The package allows you to configure things like poll increments (how often to check for new events), how long to display events, and the age of valid events.

Bandwagon’s documentation is available on, and you can learn more about this package’s source code on GitHub.

Filed in:

Paul Redmond

Full stack web developer. Author of Lumen Programming Guide and Docker for PHP Developers.