### Install laravel-npm-readme with Composer Source: https://github.com/jeffersongoncalves/laravel-npm-readme/blob/master/README.md Install the package via Composer. ```bash composer require jeffersongoncalves/laravel-npm-readme ``` -------------------------------- ### Run tests with Composer Source: https://github.com/jeffersongoncalves/laravel-npm-readme/blob/master/README.md Run the package test suite. ```bash composer test ``` -------------------------------- ### Publish npm-readme config Source: https://github.com/jeffersongoncalves/laravel-npm-readme/blob/master/README.md Optionally publish the package configuration file. ```bash php artisan vendor:publish --tag="npm-readme-config" ``` -------------------------------- ### Fetch npm package README with NpmReadme::fetchHtml Source: https://github.com/jeffersongoncalves/laravel-npm-readme/blob/master/README.md Fetch and render an npm package's README as HTML. Returns null when the URL isn't an npm package, the registry has no document, or the package ships no README. Results are cached on the default cache store (npm_readme:{package}) for config('npm-readme.cache_minutes'). ```php use JeffersonGoncalves\NpmReadme\NpmReadme; $html = NpmReadme::fetchHtml('https://www.npmjs.com/package/laravel-echo'); // or a scoped package: $html = NpmReadme::fetchHtml('https://www.npmjs.com/package/@tailwindcss/vite'); ``` -------------------------------- ### Configure custom renderer in npm-readme.php Source: https://github.com/jeffersongoncalves/laravel-npm-readme/blob/master/README.md Provide a custom renderer callable in the config to keep raw HTML. The output is then unsafe and must be sanitized before display, e.g. with jeffersongoncalves/laravel-html-sanitizer. ```php // config/npm-readme.php 'renderer' => [\App\Support\Markdown::class, 'render'], ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.