{"id":19277820,"url":"https://github.com/miyagi-dev/twig-laravel","last_synced_at":"2025-10-09T10:16:17.204Z","repository":{"id":103104473,"uuid":"514510170","full_name":"miyagi-dev/twig-laravel","owner":"miyagi-dev","description":null,"archived":false,"fork":false,"pushed_at":"2023-05-24T01:12:45.000Z","size":1321,"stargazers_count":0,"open_issues_count":5,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-09T10:16:16.395Z","etag":null,"topics":["laravel","twig","twigjs"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/miyagi-dev.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"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":"2022-07-16T07:30:34.000Z","updated_at":"2022-07-24T07:29:49.000Z","dependencies_parsed_at":null,"dependency_job_id":"3398970d-850c-4555-b0ad-7e7cee326dfb","html_url":"https://github.com/miyagi-dev/twig-laravel","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/miyagi-dev/twig-laravel","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miyagi-dev%2Ftwig-laravel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miyagi-dev%2Ftwig-laravel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miyagi-dev%2Ftwig-laravel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miyagi-dev%2Ftwig-laravel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/miyagi-dev","download_url":"https://codeload.github.com/miyagi-dev/twig-laravel/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miyagi-dev%2Ftwig-laravel/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279001324,"owners_count":26083040,"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-10-09T02:00:07.460Z","response_time":59,"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","twig","twigjs"],"created_at":"2024-11-09T21:07:01.445Z","updated_at":"2025-10-09T10:16:17.198Z","avatar_url":"https://github.com/miyagi-dev.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @miyagi/twig-laravel\n\nWhen using Laravel together with twig, this extension adds support for specific functionality to [@miyagi/core](https://npmjs.com/package/@miyagi/core).\n\n## Features\n\n### Laravel localization\n\nIn your templates, you might want to use translations with dot notation like `{{ trans('foo.bar') }}` or `{{ trans_choice('foo.bar', 2) }}`.\nBy using this extension, `miyagi` can load the translations from your localization files and use these.\n\nBy default the english localilzation files are used, which can be overwritten though.\n\nSee [Usage](#usage) for more information.\n\n### twig\n\n**NOTE:** If you need to add additional filters, functions or tags, please refer to the [_miyagi_ documentation](https://docs.miyagi.dev/configuration/extending-template-engine/).\n\n#### Functions\n\nThis extension adds mocking to functions like `csrf_field` or `asset`, so `miyagi` does not throw an error when using these in your templates.\n\n## Installation\n\n```bash\nnpm i --save-dev @miyagi/twig-laravel\n```\n\nor\n\n```bash\nyarn add -D @miyagi/twig-laravel\n```\n\n### Usage\n\nAdd the extension to your `.miyagi.js` like this:\n\n```js\nmodule.exports = {\n  extensions: [[require('@miyagi/twig-laravel'), {\n    engine: Twig // optional, only necessary if you extended Twig in your configuration file,\n    // the `locales` object is optional, the values below are the default values\n    locales: {\n      rootFolder: \"resources/lang\",\n      lang: \"en\",\n    }\n  }]],\n  ...\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiyagi-dev%2Ftwig-laravel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmiyagi-dev%2Ftwig-laravel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiyagi-dev%2Ftwig-laravel/lists"}