Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
overtrue committed Nov 23, 2022
2 parents 2d84966 + 9f51196 commit 39c4ea8
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/Traits/Liker.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,12 @@

namespace Overtrue\LaravelLike\Traits;

use Illuminate\Contracts\Pagination\CursorPaginator;
use Illuminate\Contracts\Pagination\Paginator;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Pagination\AbstractCursorPaginator;
use Illuminate\Pagination\AbstractPaginator;
use Illuminate\Pagination\LengthAwarePaginator;
use Illuminate\Support\Collection;
use Illuminate\Support\Enumerable;
use Illuminate\Support\LazyCollection;
use Overtrue\LaravelLike\Like;

Expand Down Expand Up @@ -122,7 +119,7 @@ public function attachLikeStatus(&$likeables, callable $resolver = null)
return \sprintf('%s:%s', $item->likeable_type, $item->likeable_id);
});

$attachStatus = function($likeable) use ($likes, $resolver) {
$attachStatus = function ($likeable) use ($likes, $resolver) {
$resolver = $resolver ?? fn ($m) => $m;
$likeable = $resolver($likeable);

Expand Down

0 comments on commit 39c4ea8

Please sign in to comment.