PHPackages                             musonza/laravel-activity-streams - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. musonza/laravel-activity-streams

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

musonza/laravel-activity-streams
================================

Laravel Package to help with feeds and activity streams in your application

v0.2.0(5y ago)10304[3 issues](https://github.com/musonza/laravel-activity-streams/issues)MITPHPPHP &gt;=7.1CI failing

Since Oct 11Pushed 5y ago1 watchersCompare

[ Source](https://github.com/musonza/laravel-activity-streams)[ Packagist](https://packagist.org/packages/musonza/laravel-activity-streams)[ RSS](/packages/musonza-laravel-activity-streams/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (5)Versions (5)Used By (0)

[![Build Status](https://camo.githubusercontent.com/db92e08189753efb2b11740132fd2f00d446ea50de284b73cd7abeec1db6fd8a/68747470733a2f2f7472617669732d63692e6f72672f6d75736f6e7a612f6c61726176656c2d61637469766974792d73747265616d732e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/musonza/laravel-activity-streams)

Laravel Activity Streams
========================

[](#laravel-activity-streams)

Table of Contents
-----------------

[](#table-of-contents)

Click to expand- [Introduction](#introduction)
- [Installation](#installation)
- [Usage](#usage)
    - [Facade](#facade)
    - [Giving a model an ability to have a Feed](#Giving-a-model-an-ability-to-have-a-Feed)
    - [Create a model Feed](#create-a-model-feed)
    - [On-Demand Feeds](#On-Demand-Feeds)
    - [Create an Activity](#create-an-activity)
    - [Actors](#actors)
        - [Valid Actors](#valid-actors)
    - [Targets](#targets)
        - [Valid Targets](#valid-targets)
    - [Objects](#objects)
        - [Valid Objects](#valid-objects)
    - [Get supported verbs](#Get-supported-verbs)
    - [Add an activity to a Feed](#Add-an-activity-to-a-Feed)
    - [Add multiple activities to a Feed](#Add-multiple-activities-to-a-Feed)
- [Events](#events)
- [Configuration](#configuration)
- [FAQ](#faq)

Introduction
------------

[](#introduction)

This package enables you to have activity streams in your laravel applications.

Installation
------------

[](#installation)

Install with composer

```
composer require musonza/laravel-activity-streams
```

Once the composer installation is finished, you can add alias for the facade. Open `config/app.php`, and make the following update:

1. Add a new item to the `aliases` array:

    ```
    'ActivityStreams' => Musonza\ActivityStreams\ActivityStreamsFacade::class,
    ```
2. Publish the configuration file into your app's `config` directory, by running the following command:

    ```
    php artisan vendor:publish --tag="activity.streams.config"

    ```
3. Publish the migrations into your app's `migrations` directory, by running the following command:

    ```
    php artisan vendor:publish --tag="activity.streams.migrations"

    ```
4. Run the migrations:

    ```
    php artisan migrate

    ```

Usage
-----

[](#usage)

#### Facade

[](#facade)

Whenever you use the `ActivityStreams` facade in your code, remember to add the following line to your namespace imports:

```
use ActivityStreams;
```

#### Giving a model an ability to have a Feed

[](#giving-a-model-an-ability-to-have-a-feed)

Use the `HasFeed` trait to allow a model to have a feed.

```
