{"id":15885764,"url":"https://github.com/leafsphp/inertia","last_synced_at":"2026-04-24T16:36:29.259Z","repository":{"id":186412196,"uuid":"673423292","full_name":"leafsphp/inertia","owner":"leafsphp","description":"⚡️ Inertia JS adapter for Leaf PHP","archived":false,"fork":false,"pushed_at":"2023-08-11T21:15:14.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2024-04-14T09:58:49.996Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/leafsphp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null},"funding":{"open_collective":"leaf","github":"leafsphp"}},"created_at":"2023-08-01T15:32:14.000Z","updated_at":"2024-03-15T14:42:30.000Z","dependencies_parsed_at":null,"dependency_job_id":"46574002-8fa7-4ad5-b615-9f64ec6d0407","html_url":"https://github.com/leafsphp/inertia","commit_stats":{"total_commits":13,"total_committers":1,"mean_commits":13.0,"dds":0.0,"last_synced_commit":"8a82fc2bf92783cd2db392a16485e90f1e0675a1"},"previous_names":["leafsphp/inertia"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leafsphp%2Finertia","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leafsphp%2Finertia/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leafsphp%2Finertia/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leafsphp%2Finertia/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leafsphp","download_url":"https://codeload.github.com/leafsphp/inertia/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246847053,"owners_count":20843438,"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","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":[],"created_at":"2024-10-06T05:07:26.537Z","updated_at":"2026-04-24T16:36:29.225Z","avatar_url":"https://github.com/leafsphp.png","language":"PHP","readme":"\u003c!-- markdownlint-disable no-inline-html --\u003e\n\u003cp align=\"center\"\u003e\n    \u003cbr\u003e\u003cbr\u003e\n    \u003cimg src=\"https://leafphp.dev/logo-circle.png\" height=\"100\"/\u003e\n    \u003cbr\u003e\u003cbr\u003e\n\u003c/p\u003e\n\n# Leaf + Inertia\n\nThis is a simple package that helps you use [Inertia.js](https://inertiajs.com/) with [Leaf](https://leafphp.dev). It provides a `Inertia` class that makes it easy to return Inertia responses from your Leaf controllers and output Inertia template in your Leaf views.\n\nSince Leaf supports multiple templating engines, inertia uses the engine configured in your view config.\n\n## Installation\n\n**Note: This is already done for you in Leaf MVC.**\n\nSince this is the server-side adapter for Leaf, you need to install Inertia for whatever framework you're using on the client-side. You can find a list on the [Inertia website](https://inertiajs.com/).\n\n```bash\nnpm install @inertiajs/react\n```\n\nAfter this, you can add the Leaf adapter to your project using the Leaf CLI:\n\n```bash\nleaf install inertia\n```\n\nOr with composer:\n\n```bash\ncomposer require leafs/inertia\n```\n\n## Usage\n\nTo get started, you need replace your Leaf view with the Inertia component. In place of your default Leaf view, you should return the `Inertia::render` method. This method accepts the name of your component as its first argument, and an array of data as its second argument:\n\n```php\napp()-\u003eget('/', function() {\n    return Inertia::render('Home', [\n        'name' =\u003e 'Leaf'\n    ]);\n});\n```\n\n**Full docs on [the leaf docs](https://leafphp.dev/modules/views/inertia/).**\n","funding_links":["https://opencollective.com/leaf","https://github.com/sponsors/leafsphp"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleafsphp%2Finertia","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleafsphp%2Finertia","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleafsphp%2Finertia/lists"}