php - How can I send parameter with {{ }} in laravel's @include()
one text
Solution:
You don't need to send variable. @include is a "copy/paste" (same @extend).
just do this:
@php($href=route("article"))
@include("includes.content.single-article")
and that's all. Now your blade includes.content.single-article knows the value for $href.
And if you really need a variable only for this blade
@include("catalog.task.foo", ["href" => route("purchase.provider")])
When you use a blade directive, you are in PHP context, don't use " if you don't need string.
you can
@include("catalog.task.foo", ["href" => 45+58])
And will do math
Source