\App\template_path() will return the path or your template file, but you can’t include blades because they are not valid PHP; they have to be compiled by the blade engine into valid PHP.
\App\template(string $blade, array $data) returns a string is HTML rendered from
your blade file $blade
the data passed to it $data
Your original function should look something like this:
function custom_challenges_form_tag_handler( $tag ) {
return \App\template("partials.contact-challenges"));
}
(That assumed that your partial does not have any variables in it; if it does, you would need to pass a second argument to template()that is an associative array w/ the variables the blade needs.)
Yes as I mentioned before @codepuncher’s solution worked.
I tried with template but with wrong paths and didn’t really realize the differences between the two function at first (even though I realize now the name is self-explanatory…)
I’m new to Sage, and it’s too bad there isn’t a proper documentation on all function available…
Anyway thanks for the replies people!