![](/img/trans.png)
[英]Call to undefined method Laravel\Socialite\Facades\Socialite::isDeferred()
[英]Call to undefined method Michelf\Markdown::isDeferred() in Laravel 5.2
我將在Laravel 5.2應用程序中使用michelf / php-markdown軟件包。
要安裝此軟件包,我在composer.json
文件中添加了"michelf/php-markdown": "~1.6.0"
,然后運行composer update
命令。
此后,我更改了app.php
文件,並將Michelf\\Markdown::class
添加到Providers數組,並將'Markdown' => Michelf\\Markdown::class
到別名數組。
但是當我想使用此類時:
public function store($request)
{
$title = $request->title;
$text= $request->text;
$transformedText = Markdown::defaultTransform($text);
dd($transformedQuestion);
}
我遇到這個錯誤:
FatalErrorException in C:\wamp\www\projects\stackoverflow\vendor\laravel\framework\src\Illuminate\Foundation\ProviderRepository.php line 119:
Call to undefined method Michelf\Markdown::isDeferred()
我在Laravel中安裝軟件包的方式是否錯誤?
我認為這是我對Laravel提供者的誤解。
我從app.php
文件中的Providers數組中刪除了Michelf\\Markdown::class
,它起作用了。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.