Skip to content

Commit 5625212

Browse files
committed
Update version on readme
1 parent 9c065dd commit 5625212

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Trait for Laravel Eloquent models to allow easy implementation of a "like" or "f
1414

1515
#### Composer Install (for Laravel 5)
1616

17-
composer require rtconner/laravel-likeable "~2.0"
17+
composer require rtconner/laravel-likeable "~3.0"
1818

1919
#### Then run the migrations
2020

src/Like.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
/**
88
* @mixin \Eloquent
99
* @property Likeable likeable
10+
* @property string user_id
11+
* @property string likeable_id
12+
* @property string likeable_type
1013
*/
1114
class Like extends Eloquent
1215
{

src/Likeable.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,9 @@ public function like($userId=null)
4848
->where('user_id', '=', $userId)
4949
->first();
5050

51-
if($like) return;
51+
if($like) {
52+
return;
53+
}
5254

5355
$like = new Like();
5456
$like->user_id = $userId;

0 commit comments

Comments
 (0)