Home > Backend Development > PHP Tutorial > 使用composer安装Parsedown,在Laravel中使用时提示Parsedown not found

使用composer安装Parsedown,在Laravel中使用时提示Parsedown not found

WBOY
Release: 2016-06-06 20:09:11
Original
1672 people have browsed it

本人刚开始学习PHP开发并顺便做一个练手项目,正在使用Laravel和composer搭建开发框架,因为需要用到Markdown解析,所以通过composer require erusev/parsedown安装了parsedown

当我在app/Http/routes.php中使用Parsedown时是正常的,但是当我在app/Http/Controllers/MyController.php中使用时就提示Class 'App\Http\Controllers\Parsedown' not found

我查了一下,猜测可能是没有autoload的问题,但是确实对composer不太熟悉,所以想问一下是哪里出问题了?该如何解决?

回复内容:

本人刚开始学习PHP开发并顺便做一个练手项目,正在使用Laravel和composer搭建开发框架,因为需要用到Markdown解析,所以通过composer require erusev/parsedown安装了parsedown

当我在app/Http/routes.php中使用Parsedown时是正常的,但是当我在app/Http/Controllers/MyController.php中使用时就提示Class 'App\Http\Controllers\Parsedown' not found

我查了一下,猜测可能是没有autoload的问题,但是确实对composer不太熟悉,所以想问一下是哪里出问题了?该如何解决?

是不是少了

<code class="php">use parsedown;

</code>
Copy after login
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template