I've just upgraded Laravel from 5.0 to 5.1.
I get this error:
Call to undefined method Illuminate\Foundation\Application::bindShared()
So after some searching I need to change bindShared to a singleton.
I can do this in vendor/illuminate/html/HtmlServiceProvider.php
The issue is, what happens when another dev works on the project and performs a composer install, or I deploy to a server.
How can I persist changes to files in the vendor folder?
Illuminate/html
is abandoned. UseCollective/html
instead.To install it use the following
Then in app/app.php file change/add as following
for providers
and for aliases
ref: https://laravel.com/docs/5.1/upgrade
So, for example, starting from L5.1 you can safely change:
to:
Okay based on your comment I see your issue (I should have noticed it sooner as you do mention the HTML component in your question.
The
illuminate/html
component is no longer part of Laravel proper, and hasn't yet been updated to conform to 5.1 standards. In fact, I'm pretty sure it is now officially abandoned by Taylor.However, you can replace the
illuminate/html
requirement with laravelcollective/html - that's the official community takeover of illuminate/html and should be a drop-in replacement.No having to mess with stuff in
vendor
!This issue comes due to bindShared() method , just change it in to singleton()
file is located here: /projectname/vendor/illuminate/html/HtmlServiceProvider.php
change on line no : 36 and 49
I am Rails developer & new to laravel & its just my first day and got stuck in this Form Builder issue. I have gone through many discussions and posts but got my solution on https://laravelcollective.com/docs/5.0/html To use blade form builder (Form::open) we need to change our composer.json and add
"laravelcollective/html": "~5.0"
in the require block. Then run composer update because then only new dependencies will be available to your project. Now add 'Collective\Html\HtmlServiceProvider', inside config/app.php inside providers block also you need to addinside config/app.php in aliases block.
run php artisan serve Enjoy Form builder with blade engine.