Download the PHP package musonza/laravel-activity-streams without Composer

On this page you can find all versions of the php package musonza/laravel-activity-streams. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-activity-streams

Build Status

Laravel Activity Streams

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

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

Installation

Install with composer

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:

1) Publish the configuration file into your app's config directory, by running the following command:

1) Publish the migrations into your app's migrations directory, by running the following command:

1) Run the migrations:

Usage

Facade

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

Giving a model an ability to have a Feed

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

Create a model Feed

After adding the HasFeed trait you can create a feed for the Model as follows

On-Demand Feeds

Sometimes you may want to create a Feed that's does not belong to a Model. For example, you want to add activities to a Trending Feed for your application:

Create a class to represent the Trending feed under a namespace of choice

Then run an artisan command that ships with the package

some-unique-id is unique with respect to $table->unique(['some-unique-id', 'App\Trending']);

Create an Activity

An example of an activity will be something like John liked a photo in 2018Album

Actor John
Verb like
Object photo
Target 2018Album

Actors

Valid Actors

You can pass in an Eloquent Model as an actor or any Object that implements Musonza\ActivityStreams\Contracts\ActivityActor interface

Targets

Valid Targets

You can pass in an Eloquent Model as a target or any Object that implements Musonza\ActivityStreams\Contracts\ActivityTarget interface

Objects

Valid Objects

You can pass in an Eloquent Model as an object or any Object that implements Musonza\ActivityStreams\Contracts\ActivityObject interface

Get supported verbs

Add an activity to a Feed

Add multiple activities to a Feed

Adds a Collection of activities to a Feed

Add an activity to multiple Feeds

Adds an Activity to a Collection feeds

Events

You can leverage and listen for the following events to perform actions in your application. For instance you can listen for an ActivityCreated event and depending on your business logic add the created event to a Feed or multiple feeds.

ActivityCreated

Musonza\ActivityStreams\Models\Activity\ActivityCreated

ActivityDeleted

Musonza\ActivityStreams\Models\Activity\ActivityDeleted

FeedCreated

Musonza\ActivityStreams\Models\Activity\FeedCreated

FeedDeleted

Musonza\ActivityStreams\Models\Activity\FeedDeleted

Configuration

FAQ

See more on Activity Streams specifications here


All versions of laravel-activity-streams with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1
laravel/framework Version 5.6.*|5.7.*|5.8.*|^6.0|^7.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package musonza/laravel-activity-streams contains the following files

Loading the files please wait ....