Skip to content

Commit 09abaa5

Browse files
authored
Merge pull request #28 from mabdullahsari/stubs
Add .stubs.php for IDE support
2 parents 19fe472 + 2cb4e87 commit 09abaa5

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

.stubs.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace Illuminate\View
6+
{
7+
class View
8+
{
9+
public function renderFragment(string $view, string $fragment, array $data = []): string {}
10+
}
11+
}

src/LaravelHtmxServiceProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public function boot(): void
1919

2020
$this->app->bind(HtmxRequest::class, fn ($container) => HtmxRequest::createFrom($container['request']));
2121

22-
View::macro('renderFragment', function ($view, $fragment, array $data = []) {
22+
View::macro('renderFragment', function (string $view, string $fragment, array $data = []) {
2323
return BladeFragment::render($view, $fragment, $data);
2424
});
2525
}

0 commit comments

Comments
 (0)