This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.
Hey, guys,
just noticed, that I'm not able to access common Laravel facades, such as the form builder. I think Laravel is great and it would make October even more awesome, if we could make use of Laravels built-in awesomeness :) What do you think?
Cheers! Till
You can use the FormBuilder if you want ;) You have access to all of laravel's facades and functionalities.
Even in a partial? Because I always end up with this error message:
Unexpected token "punctuation" of value ":" ("end of print statement" expected)
When I try to do this:
{{ Form::open(array(
'class' => 'test'
)) }}
Maybe this is just because I'm unfamiliar with Twig or I'm fighting a headache right now :/ So it's probably a dumb question.
Cheers! Till
Hi,
you can't directly use Laravel facades from twig templates, however the dev team implemented similar functions for twig templates (that are probably relying on laravel's facades btw): http://octobercms.com/docs/cms/markup#forms
Most of the Form facades are registered as {{ form_...() }} in Twig. We can register some more if you'd like, we only register them as we see they are needed. Most of the Facades so far are fine to be called from the Code section or Components.
1-5 of 5