class Markdown
{
protected $parser;
public function __construct(Parser $parser)
{
$this->parser = $parser;
}
public function markdown($text)
{
return $this->parser->makeHtml($text);
}
}
markdown类是这么写的,但是还是报错
ErrorException in Markdown.php line 14:
Type error: Too few arguments to function App\Markdown\Markdown::__construct(), 0 passed in /Applications/MAMP/htdocs/la51/app/Comment.php on line 23 and exactly 1 expected (View: /Applications/MAMP/htdocs/la51/resources/views/forum/show.blade.php)