Is it possible to render a Sage component outside of a blade template? I know I can render a view with
\Roots\view('partials.example-view')->render(); but when I try the same with the component, it seems the controller class is never initialized, so now data gets passed to the component. Is there an existing way to do this?
If not, I’m thinking I’ll create a method in my controller to return an array of all the variables to pass to the view like this