manavo / laravel-bootstrap-forms

ABANDONED - Using @stidges' code for bootstrap forms to create a composer package.
http://blog.stidges.com/post/easy-bootstrap-forms-in-laravel
MIT License
19 stars 12 forks source link

laravel 5 have no class name htmlBuilder or FormBuilder #10

Open ghost opened 9 years ago

ghost commented 9 years ago

in laravel 5 the form and html components extracted to LaravelCollective package . you need to use it as dependancy and make the formBuilder class extends it FormBuilder .

manavo commented 9 years ago

To keep supporting Laravel 4 though it can't be added as a dependency.

The docs should be updated though to mention it!

ghost commented 9 years ago

then add new branch and tag for laravel 5 development (maybe I can help)

dlnsk commented 8 years ago

+1 It doesn't work in 5.2

manavo commented 8 years ago

@dlnsk if you include the LaravelCollective package, does it work?

dlnsk commented 8 years ago

No. Even if I correct errors with extents, change bindShared() to singleton() it rises an error:

ErrorException in FormBuilder.php line 35: Argument 3 passed to Collective\Html\FormBuilder::__construct() must implement interface Illuminate\Contracts\View\Factory, string given, called in /vendor/manavo/laravel-bootstrap-forms/src/Manavo/BootstrapForms/BootstrapFormsServiceProvider.php on line 38 and defined (View: /resources/views/claim/edit.blade.php)

dlnsk commented 8 years ago

Catch it!

Should change to $form = new FormBuilder($app['html'], $app['url'], $app['view']); in BootstrapFormsServiceProvider.php

Now there isn't errors, but label of group passed througth htmlentities so displays as code.

dlnsk commented 8 years ago

I've placed output of openGroup and closeGroup into $this->toHtmlString() and now it works fine. But this package doesn't support .form-horizontal style of form.