Skip to content

Commit

Permalink
Add return types to View component render
Browse files Browse the repository at this point in the history
  • Loading branch information
rawilk committed Apr 9, 2024
1 parent 64abf65 commit 3342152
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion stubs/view-component.stub
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,17 @@ declare(strict_types=1);

namespace {{ namespace }};

use Closure;
use Illuminate\View\Component;
use Illuminate\Contracts\View\View;

class {{ class }} extends Component
{
public function __construct()
{
}

public function render()
public function render(): View|Closure|string
{
return {{ view }};
}
Expand Down

0 comments on commit 3342152

Please sign in to comment.