Including sub-view with data

Hello everyone,

I want to include sub view with Edge Template Engine. But I couldn’t find anything about it documentation.

You may checkout what I am talking about in here, Blade Template Engine Documentation;

Including Sub Views

Actually I want to do this;

@include('', ['some' => 'data'])

Is it implemented on Edge template engine?

You don’t need to specify the variables when you use include, it will pick them up from the parent automatically.

You only need to specify them when you use @!component() and the format then is

@!component("viewname.edge", var1="spam", var2="eggs")

so in your case, as long as the variable some is being passed into your view from the controller, you can just use