我刚刚将Laravel从5.0升级到5.1.

我得到这个错误:

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.

如何将更改保存到供应商文件夹中的文件?

推荐答案

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.

illuminate/html组件不再是Laravel的一部分,尚未更新以符合5.1标准.事实上,我很确定它现在已经被泰勒正式放弃了.

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!

Laravel相关问答推荐

Hostinger Laravel网站未显示错误

在Laravel Livewire中,如果一个输入基于另一个唯一的字段是唯一的,如何判断验证?

Laravel:在行的子集上同步多对多

Laravel:BelongstoMany 关系实现

使用 Amazon S3 的 Storage::get() 返回 false

如何在 laravel 5.2 中显示 500 内部服务器错误页面?

使用 Eloquent 的 Laravel 块方法

在表单中添加一对多 - Backpack laravel

条带 api 判断现有卡

未定义的类常量App\Providers\RouteServiceProvider::HOME

带有时间戳的 Laravel 5.1 eloquent::attach() 方法

Laravel - 更新时禁用更新时间

Laravel 4 - 如何将所有字段的所有验证错误消息作为 JSON struct 返回?

Laravel 在保存前生成 slug

如何在 Laravel 视图中找到当前语言?

Laravel 验证:数字和整数之间的区别?

Laravel 事件、监听器、作业(job)、队列之间的区别

Laravel 5如何获取路由动作名称?

如何判断是否连接到 Laravel 4 中的数据库?

如何在不要求用户登录 Laravel 的情况下验证Electron邮件