@@ -24,15 +24,15 @@ |
||
24 | 24 | public function boot() |
25 | 25 | { |
26 | 26 | $this->publishes([ |
27 | - \dirname(__DIR__) . '/config/follow.php' => config_path('follow.php'), |
|
27 | + \dirname(__DIR__).'/config/follow.php' => config_path('follow.php'), |
|
28 | 28 | ], 'config'); |
29 | 29 | |
30 | 30 | $this->publishes([ |
31 | - \dirname(__DIR__) . '/migrations/' => database_path('migrations'), |
|
31 | + \dirname(__DIR__).'/migrations/' => database_path('migrations'), |
|
32 | 32 | ], 'migrations'); |
33 | 33 | |
34 | 34 | if ($this->app->runningInConsole()) { |
35 | - $this->loadMigrationsFrom(\dirname(__DIR__) . '/migrations/'); |
|
35 | + $this->loadMigrationsFrom(\dirname(__DIR__).'/migrations/'); |
|
36 | 36 | } |
37 | 37 | } |
38 | 38 | } |
@@ -1,8 +1,8 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | 3 | return [ |
4 | - /* |
|
4 | + /* |
|
5 | 5 | * Table name for followers records. |
6 | 6 | */ |
7 | - 'relation_table' => 'user_follower', |
|
7 | + 'relation_table' => 'user_follower', |
|
8 | 8 | ]; |
@@ -8,7 +8,7 @@ |
||
8 | 8 | { |
9 | 9 | public function up() |
10 | 10 | { |
11 | - Schema::create(config('follow.relation_table', 'user_follower'), function (Blueprint $table) { |
|
11 | + Schema::create(config('follow.relation_table', 'user_follower'), function(Blueprint $table) { |
|
12 | 12 | $table->increments('id'); |
13 | 13 | $table->unsignedBigInteger('following_id')->index(); |
14 | 14 | $table->unsignedBigInteger('follower_id')->index(); |
@@ -192,8 +192,8 @@ |
||
192 | 192 | |
193 | 193 | $followed = $this->followings()->wherePivot('accepted_at', '!=', null)->pluck('following_id'); |
194 | 194 | |
195 | - $followables->map(function ($followable) use ($followed, $resolver) { |
|
196 | - $resolver = $resolver ?? fn ($m) => $m; |
|
195 | + $followables->map(function($followable) use ($followed, $resolver) { |
|
196 | + $resolver = $resolver ?? fn($m) => $m; |
|
197 | 197 | $followable = $resolver($followable); |
198 | 198 | |
199 | 199 | if ($followable && \in_array(Followable::class, \class_uses($followable))) { |