We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9070c12 commit 45b4830Copy full SHA for 45b4830
src/Helper.php
@@ -5,9 +5,12 @@
5
use Illuminate\Database\Eloquent\Model;
6
use Illuminate\Support\Arr;
7
use Illuminate\Support\Str;
8
+use Illuminate\Support\Traits\Macroable;
9
10
class Helper
11
{
12
+ use Macroable;
13
+
14
public static function paginationLimit(int $default = 16, int $max = 48): int
15
16
$limit = request()->get('limit') ?? $default;
tests/HelpersTest.php
@@ -101,3 +101,9 @@
101
['model' => Article::class, 'result' => 'id'],
102
['model' => new Article(), 'result' => 'id'],
103
]);
104
105
+it('is macroable', function () {
106
+ hlp()->macro('foo', fn () => 'macroable');
107
108
+ expect(hlp()->foo())->toBe('macroable');
109
+});
0 commit comments