@@ -11,22 +11,22 @@ class Follower extends Model
1111 /**
1212 * @inheritdoc
1313 */
14- protected $ fillable = [
15- 'follower_id ' ,
16- 'follower_type ' ,
17- 'followable_id ' ,
18- 'followable_type ' ,
19- ];
14+ protected $ fillable = [
15+ 'follower_id ' ,
16+ 'follower_type ' ,
17+ 'followable_id ' ,
18+ 'followable_type ' ,
19+ ];
2020
2121 /**
2222 * @inheritdoc
2323 */
24- protected $ dates = ['deleted_at ' ];
24+ protected $ dates = ['deleted_at ' ];
2525
2626 /**
2727 * @inheritdoc
2828 */
29- protected $ with = ['followable ' , 'follower ' ];
29+ protected $ with = ['followable ' , 'follower ' ];
3030
3131 /**
3232 * @inheritdoc
@@ -38,47 +38,47 @@ public function __construct()
3838 $ this ->table = config ('lecturize.followers.table ' , 'followers ' );
3939 }
4040
41- /**
42- * Morph followables
43- *
44- * @return \Illuminate\Database\Eloquent\Relations\MorphTo
45- */
46- public function followable ()
47- {
48- return $ this ->morphTo ();
49- }
41+ /**
42+ * Morph followables
43+ *
44+ * @return \Illuminate\Database\Eloquent\Relations\MorphTo
45+ */
46+ public function followable ()
47+ {
48+ return $ this ->morphTo ();
49+ }
5050
51- /**
52- * Morph followers
53- *
54- * @return \Illuminate\Database\Eloquent\Relations\MorphTo
55- */
56- public function follower ()
57- {
58- return $ this ->morphTo ();
59- }
51+ /**
52+ * Morph followers
53+ *
54+ * @return \Illuminate\Database\Eloquent\Relations\MorphTo
55+ */
56+ public function follower ()
57+ {
58+ return $ this ->morphTo ();
59+ }
6060
61- /**
62- * @param object $query
63- * @param Model $followable
64- * @return mixed
65- */
66- public function scopeFollowing ( $ query , Model $ followable )
67- {
68- return $ query
69- ->where ( 'followable_id ' , $ followable ->id )
70- ->where ( 'followable_type ' , get_class ($ followable ) );
71- }
61+ /**
62+ * @param object $query
63+ * @param Model $followable
64+ * @return mixed
65+ */
66+ public function scopeFollowing ( $ query , Model $ followable )
67+ {
68+ return $ query
69+ ->where ( 'followable_id ' , $ followable ->id )
70+ ->where ( 'followable_type ' , get_class ($ followable ) );
71+ }
7272
73- /**
74- * @param object $query
75- * @param Model $follower
76- * @return mixed
77- */
78- public function scopeFollowedBy ( $ query , Model $ follower )
79- {
80- return $ query
81- ->where ( 'follower_id ' , $ follower ->id )
82- ->where ( 'follower_type ' , get_class ($ follower ) );
83- }
73+ /**
74+ * @param object $query
75+ * @param Model $follower
76+ * @return mixed
77+ */
78+ public function scopeFollowedBy ( $ query , Model $ follower )
79+ {
80+ return $ query
81+ ->where ( 'follower_id ' , $ follower ->id )
82+ ->where ( 'follower_type ' , get_class ($ follower ) );
83+ }
8484}
0 commit comments