Skip to content

Commit

Permalink
Merge pull request #24 from Laravel-Lang/1.x
Browse files Browse the repository at this point in the history
Fix: Object of class Illuminate\Support\Collection could not be converted to int
  • Loading branch information
andrey-helldar authored Mar 24, 2024
2 parents 8cac01a + 07dd708 commit 3a1c0b0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/Providers/StringServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public function boot(): void

$result = $rows
->take($limit)
->when($rows > $limit, fn (Collection $items) => $items->push('...'))
->when($rows->count() > $limit, fn (Collection $items) => $items->push('...'))
->implode(PHP_EOL);

return new Stringable($result);
Expand Down

0 comments on commit 3a1c0b0

Please sign in to comment.