Skip to content
This repository was archived by the owner on Aug 5, 2025. It is now read-only.
This repository was archived by the owner on Aug 5, 2025. It is now read-only.

Collective FormBuilder Expects CSRF Token #15

@lloy0076

Description

@lloy0076

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions