{"id":22278036,"url":"https://github.com/enflow/twig-blade-loader","last_synced_at":"2025-07-28T18:30:34.948Z","repository":{"id":44317961,"uuid":"315989710","full_name":"enflow/twig-blade-loader","owner":"enflow","description":"Load Blade into your Twig templates","archived":false,"fork":false,"pushed_at":"2025-02-22T20:08:14.000Z","size":35,"stargazers_count":3,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-28T14:18:13.256Z","etag":null,"topics":[],"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/enflow.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","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},"funding":{"custom":"https://enflow.nl/contact"}},"created_at":"2020-11-25T16:06:46.000Z","updated_at":"2025-02-22T20:07:56.000Z","dependencies_parsed_at":"2023-12-25T20:33:30.465Z","dependency_job_id":"1d3f5cca-2f2e-4f86-9f02-c6f2db47c5d4","html_url":"https://github.com/enflow/twig-blade-loader","commit_stats":{"total_commits":12,"total_committers":4,"mean_commits":3.0,"dds":"0.33333333333333337","last_synced_commit":"083b8158b254d8b95a7f8407020333f2429c7656"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/enflow/twig-blade-loader","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enflow%2Ftwig-blade-loader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enflow%2Ftwig-blade-loader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enflow%2Ftwig-blade-loader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enflow%2Ftwig-blade-loader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/enflow","download_url":"https://codeload.github.com/enflow/twig-blade-loader/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enflow%2Ftwig-blade-loader/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267563486,"owners_count":24108097,"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-07-28T02:00:09.689Z","response_time":68,"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":[],"created_at":"2024-12-03T15:12:39.377Z","updated_at":"2025-07-28T18:30:34.558Z","avatar_url":"https://github.com/enflow.png","language":"PHP","readme":"# Blade Loader for Twig\n\n[![Latest Version on Packagist](https://img.shields.io/packagist/v/enflow/twig-blade-loader.svg?style=flat-square)](https://packagist.org/packages/enflow/twig-blade-loader)\n![GitHub Workflow Status](https://github.com/enflow/twig-blade-loader/workflows/run-tests/badge.svg)\n[![Total Downloads](https://img.shields.io/packagist/dt/enflow/twig-blade-loader.svg?style=flat-square)](https://packagist.org/packages/enflow/twig-blade-loader)\n\nThe `enflow/twig-blade-loader` package provides the option to load Blade syntax into your Twig files. Mostly used for importing Blade Components from third-parties into your Twig-only application.\n\n## Installation\nYou can install the package via composer:\n\n``` bash\ncomposer require enflow/twig-blade-loader\n```\n\n## Usage\nThe Twig extension will automatically register when `rcrowe/twigbridge` is used.\nIf you're using another configuration, you may wish to register the extension manually by loading the extension `Enflow\\TwigBladeLoader\\TwigBladeLoaderExtension`.\n\n### Example\n\nTake for instance, you have your Twig file, but you wish to include the https://medialibrary.pro/ library from Spatie. This only includes Blade Component syntax:\n```\u003cx-media-library-attachment name=\"avatar\"/\u003e```\n\nYou can use the `{% blade %}` syntax for this. \n\n```twig\n{% blade %}\u003cx-media-library-attachment :name=\"$fieldName\"/\u003e{% endblade %}\n```\n\nThat's it! Your variables are automatically passed along from your global scope, and available to pass along.\n\n## Variables\nYou may choose to pass along extra variables to your Blade logic:\n\n```twig\n{% blade with {fieldName: 'avatar'} %}\n    \u003cx-media-library-attachment :name=\"$fieldName\"/\u003e\n{% endblade %}\n```\n\n## Caveat\nThere is one big caveat though: Blade variables. As the syntax for rendering Blade variables is the same as Twig's, this conflicts.\nYou may use the 'verbatim' class to work around this:\n\n```twig\n{% blade with {'name': 'name-in-verbatim'} %}\n{% verbatim %}\n{{ $name }}\n{% endverbatim %}\n{% endblade %}\n```\n\n## Testing\n``` bash\n$ composer test\n```\n\n## Contributing\nPlease see [CONTRIBUTING](CONTRIBUTING.md) for details.\n\n## Security\nIf you discover any security related issues, please email michel@enflow.nl instead of using the issue tracker.\n\n## Credits\n- [Michel Bardelmeijer](https://github.com/mbardelmeijer)\n- [All Contributors](../../contributors)\n\n## About Enflow\nEnflow is a digital creative agency based in Alphen aan den Rijn, Netherlands. We specialize in developing web applications, mobile applications and websites. You can find more info [on our website](https://enflow.nl/en).\n\n## License\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n","funding_links":["https://enflow.nl/contact"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fenflow%2Ftwig-blade-loader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fenflow%2Ftwig-blade-loader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fenflow%2Ftwig-blade-loader/lists"}