TwigBridge icon indicating copy to clipboard operation
TwigBridge copied to clipboard

Cannot use Form Extension in Laravel 5.3

Open maximeberard opened this issue 8 years ago • 2 comments

I got a problem using Form Extension in Laravel 5.3. The extension is enabled in config/twigbridge.phpfile. I uncommented the line for form Extension.

At first i had a problem of missing dependency with laravelcollective/html FormBuilder so i added the dependency in my composer.jsonfile.

But i have now a new issue using this form extension in my template, which is : Cannot instantiate Twig extension 'TwigBridge\Extension\Laravel\Form': Unresolvable dependency resolving [Parameter #3 [ <required> $csrfToken ]] in class Collective\Html\FormBuilder

Is there any way to use properly this extension in Laravel 5.3 please?

maximeberard avatar Feb 08 '17 19:02 maximeberard

I'm having the same issue, the README says that this extension is enabled by default (with some others) but is actually commented out in config/twigbridge.php

gigo6000 avatar Aug 26 '17 17:08 gigo6000

It's commented out, because classes it uses are no longer shipped with Laravel and were moved out into https://github.com/illuminate/html. You need to require illuminate/html package in your composer.json and then enabling these form providers would work.

aik099 avatar Aug 26 '17 19:08 aik099