Skip to content

Support for Laravel 5.2 #14

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/Manavo/BootstrapForms/BootstrapFormsServiceProvider.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php namespace Manavo\BootstrapForms;

use Illuminate\Html\HtmlServiceProvider as IlluminateHtmlServiceProvider;
use Collective\Html\HtmlServiceProvider as CollectiveHtmlServiceProvider;

class BootstrapFormsServiceProvider extends IlluminateHtmlServiceProvider
class BootstrapFormsServiceProvider extends CollectiveHtmlServiceProvider
{

/**
Expand Down Expand Up @@ -32,9 +32,9 @@ public function boot()
*/
public function registerFormBuilder()
{
$this->app->bindShared('form', function ($app) {
$this->app->singleton('form', function ($app) {
$form = new FormBuilder($app['html'], $app['url'],
$app['session.store']->getToken());
$app['view']);

return $form->setSessionStore($app['session.store']);
});
Expand Down
8 changes: 4 additions & 4 deletions src/Manavo/BootstrapForms/FormBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

namespace Manavo\BootstrapForms;

use Illuminate\Html\FormBuilder as IlluminateFormBuilder;
use Collective\Html\FormBuilder as CollectiveFormBuilder;

class FormBuilder extends IlluminateFormBuilder
class FormBuilder extends CollectiveFormBuilder
{

/**
Expand Down Expand Up @@ -64,7 +64,7 @@ public function openGroup(
}
}

return '<div' . $this->html->attributes($attributes) . '>' . $label;
return $this->toHtmlString('<div' . $this->html->attributes($attributes) . '>' . $label);
}

/**
Expand All @@ -89,7 +89,7 @@ public function closeGroup()
}

// Append the errors to the group and close it out.
return $errors . '</div>';
return $this->toHtmlString($errors . '</div>');
}

/**
Expand Down