Skip to content

Commit

Permalink
Events
Browse files Browse the repository at this point in the history
  • Loading branch information
overtrue committed Mar 13, 2019
1 parent f5f3d2a commit 3c10ed0
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 0 deletions.
38 changes: 38 additions & 0 deletions src/Events/Event.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?php

/*
* This file is part of the overtrue/laravel-like.
*
* (c) overtrue <[email protected]>
*
* This source file is subject to the MIT license that is bundled.
*/

namespace Overtrue\LaravelLike\Events;

use Illuminate\Database\Eloquent\Model;

class Event
{
/**
* @var \Illuminate\Database\Eloquent\Model
*/
public $user;

/**
* @var \Illuminate\Database\Eloquent\Model
*/
public $target;

/**
* Event constructor.
*
* @param \Illuminate\Database\Eloquent\Model $user
* @param \Illuminate\Database\Eloquent\Model $target
*/
public function __construct(Model $user, Model $target)
{
$this->user = $user;
$this->target = $target;
}
}
15 changes: 15 additions & 0 deletions src/Events/Liked.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php

/*
* This file is part of the overtrue/laravel-like.
*
* (c) overtrue <[email protected]>
*
* This source file is subject to the MIT license that is bundled.
*/

namespace Overtrue\LaravelLike\Events;

class Liked extends Event
{
}
15 changes: 15 additions & 0 deletions src/Events/Unliked.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php

/*
* This file is part of the overtrue/laravel-like.
*
* (c) overtrue <[email protected]>
*
* This source file is subject to the MIT license that is bundled.
*/

namespace Overtrue\LaravelLike\Events;

class Unliked extends Event
{
}

0 comments on commit 3c10ed0

Please sign in to comment.