jeffersongoncalves/laravel-github-readme
A Laravel package for fetching GitHub repository READMEs and using them in your app. It offers a simple way to retrieve README content from GitHub, making it easy to display project documentation, build profile pages, or power internal dashboards.
composer require jeffersongoncalves/laravel-github-readme and publish the config (php artisan vendor:publish --tag="github-readme-config"). The config file is the first place to look — it holds the repository owner/name defaults, GitHub token, cache TTL, and rendering options.GITHUB_TOKEN (and optionally GITHUB_REPOSITORY) to .env. Unauthenticated GitHub API calls are rate-limited to 60/hour, so a token is effectively required for anything beyond local tinkering. Look at the package's config keys first to confirm exact env names before wiring them into .env.example.src/ for the facade accessor and the Blade component namespace to get the exact syntax.php artisan tinker (call the facade/service and dump the returned string) before embedding it in a view. This isolates API/config problems from HTML/CSS problems.php artisan vendor:publish with the relevant tags and php artisan migrate as instructed in the README. Many of these small packages only need the config, so read the publish tags carefully.Cache::remember. Keep the TTL in config, not hardcoded, and consider a longer TTL in production (e.g. 1–6 hours) since READMEs change infrequently and every cache miss is a rate-limit hit.prose-style container (Tailwind Typography or similar) so Markdown-rendered HTML matches your design system.forRepository()-style setter, depending on the API surface) rather than mutating global config at runtime — mutating config mid-request is a classic source of bleed-through bugs in queued/octane contexts.Cache::forget on deploy if you want fresh content after a release.Http::fake) and assert on the rendered HTML. Avoid hitting the real API in CI; without a token you'll flake on rate limits.ConnectionException when the GitHub API times out, so a slow/unreachable GitHub no longer throws an unhandled exception. If you were previously wrapping calls in your own try/catch for Illuminate\Http\Client\ConnectionException, you can likely remove that defensive code — but confirm what the handler returns (null, empty string, or a cached fallback) and make your Blade fallback tolerant of it. Don't assume it returns cached content.403 with X-RateLimit-Remaining: 0 means you've exhausted the quota (60/hr unauthenticated, 5000/hr authenticated). Check GITHUB_TOKEN is actually being read, and cache aggressively. Log the X-RateLimit-Reset header when debugging../assets/logo.png) that break on your domain. Expect to post-process the HTML to rewrite relative URLs to raw.githubusercontent.com, or accept broken images. Also confirm whether the package sanitizes HTML — if not, be cautious rendering arbitrary README content from repos you don't control.^2.0 and read the changelog between minor bumps — the surrounding release history (v2.0.x) suggests the 2.0 line is where breaking API/config changes landed.How can I help you explore Laravel packages today?