调用未定义的方法 IlluminateFoundationApplication::bindShared() [英] Call to undefined method IlluminateFoundationApplication::bindShared()

查看:27
本文介绍了调用未定义的方法 IlluminateFoundationApplication::bindShared()的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I've just upgraded Laravel from 5.0 to 5.1.

我收到此错误:

Call to undefined method IlluminateFoundationApplication::bindShared()

所以经过一番搜索后,我需要将 bindShared 更改为单例.

So after some searching I need to change bindShared to a singleton.

我可以在 vendor/illuminate/html/HtmlServiceProvider.php 中做到这一点

I can do this in vendor/illuminate/html/HtmlServiceProvider.php

问题是,当另一个开发人员在项目上工作并执行 composer 安装,或者我部署到服务器时会发生什么.

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?

推荐答案

好的,根据您的评论,我看到了您的问题(当您在问题中提到 HTML 组件时,我应该尽快注意到它.

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 标准.事实上,我很确定它现在已被 Taylor 正式放弃了.

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.

但是,您可以将 illuminate/html 要求替换为 laravelcollective/html - 那就是官方社区接管了Illumination/html,应该是一个替代品.

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.

不必弄乱vendor中的东西!

这篇关于调用未定义的方法 IlluminateFoundationApplication::bindShared()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆