Git Product home page Git Product logo

laravel-activity-streams's People

Contributors

abrahampe avatar hakanersu avatar musonza avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

laravel-activity-streams's Issues

Can't install

Command composer require musonza/laravel-activity-streams does not work, because the package is not at packagist

Laravel 7.0

Hi there, do you have any plans to make compatible with laravel 7.0

Undocumented implementation required for extra data.

In ActivityObject interface getExtraData method which i thought enough for including extra data to ActivityStream but it seems ReturnsExtraData implementation required for adding extra data. Is it necessary to implement another interface for extra data?

public static function createFromModel(Model $model, $extraData = []): ActivityObject
{
if ($model instanceof ReturnsExtraData) {
$extraData = $model->getExtraData();
}
return new static(get_class($model), $model->getKey(), $extraData);

Migration breaking with mysql database

On 8.0 version this line breaks in the commented line below:

Schema::create('feeds', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('feedable_type');
$table->string('feedable_id')->unsigned(); //As a string field it does not support unsigned
$table->unique(['feedable_id', 'feedable_type']);
$table->text('extra')->nullable();
$table->timestamps();
});

Probably because of this error the constraints also break with error:

SQLSTATE[HY000]: General error: 3780 Referencing column 'activity_id' and referenced column 'id' in foreign key constraint 'feed_activities_activity_id_foreign' are incompatible.")

        $table->bigIncrements('id');
        $table->bigInteger('activity_id');
        $table->bigInteger('feed_id');
        $table->unique(['feed_id', 'activity_id']);
        $table->text('extra')->nullable();
        $table->timestamps();

        $table->foreign('activity_id')
            ->references('id')
            ->on('activities')
            ->onDelete('cascade');

        $table->foreign('feed_id')
            ->references('id')
            ->on('feeds')
            ->onDelete('cascade');

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.