Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Collective FormBuilder Expects CSRF Token #15

Open
lloy0076 opened this issue Feb 21, 2016 · 0 comments
Open

Collective FormBuilder Expects CSRF Token #15

lloy0076 opened this issue Feb 21, 2016 · 0 comments

Comments

@lloy0076
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant