Skip to content

DocBlock in Blade to link to the used method #40

Answered by brendt
ivandokov asked this question in Q&A
Discussion options

You must be logged in to vote

Referencing the function itself with its signature won't be possible. You could type hint the view model itself, but you'd need to call the function on it if you want proper static analysis:

@php
/** @var \App\…\PostViewModel $viewModel */
@endphp

{{ $viewModel->formatPrice($post) }}

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@ivandokov
Comment options

Answer selected by ivandokov
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants