Collective FormBuilder Expects CSRF Token
lloy0076 opened this issue · comments
It seems that the collective formbuilder expects a CSRF token:
100 public function __construct(HtmlBuilder $html, UrlGenerator $url, Factory $view, $csrfToken)
However using the example gives:
Missing argument 4 for Collective\Html\FormBuilder::__construct(), called in /home/lloy0076/Documents/Programming/AGIX/Drakes/NewLines/vendor/manavo/laravel-bootstrap-forms/src/Manavo/BootstrapForms/BootstrapFormsServiceProvider.php on line 37
Note the composer.lock:
585 "name": "laravelcollective/html",
586 "version": "v5.2.4",
587 "source": {
588 "type": "git",
589 "url": "https://github.com/LaravelCollective/html.git",
590 "reference": "3a312d39ffe37da0f57b602618b61fd07c1fcec5"
591 },
...
721 {
722 "name": "manavo/laravel-bootstrap-forms",
723 "version": "dev-laravel52",
724 "source": {
725 "type": "git",
726 "url": "https://github.com/dlnsk/laravel-bootstrap-forms.git",
727 "reference": "ba1120b465c14dd0d6a1e97ec4ac27ca0c9ac9a8"
728 },
That is to say, I'm up to date with Laravel Collective (as of 22 February 2016 0806 AU-CST) and using the development branch, "dev-laravel52".
I did a bit of happy hacking and fixed line 100 in FormBuilder.php to have a default CSRF of "" - which incidentally fixed this issue.
I'm not sure if this is an issue with this class - personally I think CSRF tokens are optional...but what do others say?