{"id":26610113,"url":"https://github.com/sandulat/laratron","last_synced_at":"2025-09-10T04:09:03.086Z","repository":{"id":98566047,"uuid":"195793291","full_name":"sandulat/laratron","owner":"sandulat","description":"🖼 Laravel SSR using Rendertron 🖼","archived":false,"fork":false,"pushed_at":"2020-08-01T19:58:49.000Z","size":11,"stargazers_count":27,"open_issues_count":1,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-26T17:53:46.215Z","etag":null,"topics":["laravel","laravel-rendertron","laravel-ssr","rendertron","ssr"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sandulat.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-07-08T10:51:50.000Z","updated_at":"2024-02-07T14:26:03.000Z","dependencies_parsed_at":null,"dependency_job_id":"c3aac0ee-e4df-4dbc-a130-924fafd062ba","html_url":"https://github.com/sandulat/laratron","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/sandulat/laratron","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sandulat%2Flaratron","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sandulat%2Flaratron/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sandulat%2Flaratron/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sandulat%2Flaratron/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sandulat","download_url":"https://codeload.github.com/sandulat/laratron/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sandulat%2Flaratron/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268157898,"owners_count":24204763,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-01T02:00:08.611Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["laravel","laravel-rendertron","laravel-ssr","rendertron","ssr"],"created_at":"2025-03-24T01:31:21.900Z","updated_at":"2025-08-10T12:16:10.554Z","avatar_url":"https://github.com/sandulat.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003eLaratron\u003c/h1\u003e\n\u003cp align=\"center\"\u003e\n🖼Laravel SSR using Rendertron 🖼\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://img.shields.io/packagist/vpre/sandulat/laratron.svg\"\u003e\n\u003cimg src=\"https://img.shields.io/github/license/sandulat/laratron.svg\"\u003e\n\u003ca href=\"https://twitter.com/intent/follow?screen_name=sandulat\"\u003e\n  \u003cimg src=\"https://img.shields.io/twitter/follow/sandulat.svg?style=social\"\u003e\n\u003c/a\u003e\n\u003cp\u003e\n\n## About\n\nSince we know that not all crawlers can render Javascript, we have to implement SSR (Server-Side Rendering). Implementing SSR in Laravel may be a headache and the easiest solution could be [Rendertron](https://github.com/GoogleChrome/rendertron).\n\n**Laratron** is a tiny middleware for your Laravel app that detects whether the visitor is a crawler and passes the request to Rendertron.\n\nAbout Rendertron (from official Readme):\n\u003e Rendertron is designed to enable your Progressive Web App (PWA) to serve the correct content to any bot that doesn't render or execute JavaScript. Rendertron runs as a standalone HTTP server. Rendertron renders requested pages using Headless Chrome, auto-detecting when your PWA has completed loading and serializes the response back to the original request. To use Rendertron, your application configures middleware to determine whether to proxy a request to Rendertron. Rendertron is compatible with all client side technologies, including web components.\n\n## Installation\nFirst of all we need to install Rendertron. Please consult the [official documentation](https://github.com/GoogleChrome/rendertron) for more info.\nTo install Laratron run this inside your project:\n```bash\ncomposer require sandulat/laratron\n```\n\n## Configuration\nLaratron exposes only one simple option, the URL of Rendertron, which can be set in your env file:\n```bash\nRENDERTRON_URL=http://localhost:3000\n```\n\n## Usage\nAfter installation you can use the middleware **`laratron`** on any route that you'd like to be server-side rendered.\n\n```php\nRoute::get('/', function () {\n    return view('home');\n})-\u003emiddleware('laratron');\n```\n\nOr you can apply it on the entire `web` middleware group in `App\\Http\\Kernel`:\n```php\n'web' =\u003e [\n    // ...\n    \\Sandulat\\Laratron\\Http\\Middleware\\LaratronMiddleware::class,\n],\n```\n\n## Credits\n\nCreated by [Stratulat Alexandru](https://twitter.com/sandulat).\n\n\u003ca href=\"https://coltorapps.com/\"\u003e\n  \u003cimg src=\"https://coltorapps.com/images/logo_transparent.png\" width=\"150px\"\u003e\n\u003c/a\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsandulat%2Flaratron","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsandulat%2Flaratron","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsandulat%2Flaratron/lists"}