I am going to use michelf/php-markdown package in my Laravel 5.2 application.
To install this package I added "michelf/php-markdown": "~1.6.0"
to composer.json
file and then I ran composer update
command.
After this, I changed app.php
file and added Michelf\Markdown::class
to Providers array and 'Markdown' => Michelf\Markdown::class
to aliases array.
But when I want to use this class:
public function store($request)
{
$title = $request->title;
$text= $request->text;
$transformedText = Markdown::defaultTransform($text);
dd($transformedQuestion);
}
I face this error:
FatalErrorException in C:\wamp\www\projects\stackoverflow\vendor\laravel\framework\src\Illuminate\Foundation\ProviderRepository.php line 119:
Call to undefined method Michelf\Markdown::isDeferred()
Is my way to install a package in Laravel wrong?