{"id":28466598,"url":"https://github.com/locize/laravelphp","last_synced_at":"2025-07-18T03:04:06.519Z","repository":{"id":66316575,"uuid":"157843068","full_name":"locize/laravelphp","owner":"locize","description":"laravel2js and js2laravel converter laravel php resource utils","archived":false,"fork":false,"pushed_at":"2023-10-13T13:28:05.000Z","size":346,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-07-10T02:52:20.731Z","etag":null,"topics":["converter","javascript","json","laravel","parser","php"],"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/locize.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":"2018-11-16T09:20:29.000Z","updated_at":"2023-10-13T13:27:57.000Z","dependencies_parsed_at":"2024-06-19T13:32:51.782Z","dependency_job_id":"b5ed98cb-4e75-413d-a1e8-5f53886da8fb","html_url":"https://github.com/locize/laravelphp","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/locize/laravelphp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/locize%2Flaravelphp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/locize%2Flaravelphp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/locize%2Flaravelphp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/locize%2Flaravelphp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/locize","download_url":"https://codeload.github.com/locize/laravelphp/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/locize%2Flaravelphp/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265694756,"owners_count":23812453,"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":["converter","javascript","json","laravel","parser","php"],"created_at":"2025-06-07T07:04:51.782Z","updated_at":"2025-07-18T03:04:06.190Z","avatar_url":"https://github.com/locize.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![travis](https://img.shields.io/travis/locize/laravelphp.svg)](https://travis-ci.org/locize/laravelphp) [![npm](https://img.shields.io/npm/v/laravelphp.svg)](https://npmjs.org/package/laravelphp)\n\n## Download\n\nThe source is available for download from\n[GitHub](https://github.com/locize/laravelphp/archive/master.zip).\nAlternatively, you can install using npm:\n\n```sh\nnpm install --save laravelphp\n```\n\nYou can then `import` or `require()` laravel as normal:\n\n```js\nimport laravelphp from 'laravelphp'\n// or\nconst laravelphp = require('laravelphp')\n\nlaravelphp.laravel2js(php, (err, res) =\u003e {})\n```\n\nOr you can direclty `import` or `require()` its functions:\n\n```js\nimport resx2js from 'laravelphp/laravel2js'\n// or\nconst resx2js = require('laravelphp/cjs/laravel2js')\n```\n\n## Usage\n\n```js\n\nconst php = `\u003c?php\n  return [\n    'key1' =\u003e 'Hello! Let\\'s go!',\n    'key2' =\u003e 'An application to manipulate and process laravel php language files',\n    'key' =\u003e [\n      'nested' =\u003e 'laravel Data Manager'\n    ]\n  ];`\n\nconst js = {\n  \"key1\": \"Hello! Let's go!\",\n  \"key2\": \"An application to manipulate and process laravel php language files\",\n  \"key\": {\n    \"nested\": \"laravel Data Manager\"\n  }\n}\n\n\nimport laravel2js from 'laravelphp/laravel2js'\nlaravel2js(php, (err, res) =\u003e {\n  // res is like js\n});\n\nimport js2laravel from 'laravelphp/js2laravel'\njs2laravel(js, (err, res) =\u003e {\n  // res is like php\n});\n\n```\n\nOmitting the callback returns a promise\n\n```js\nconst resJs = await laravel2js(php)\nconst resPhp = await js2laravel(js)\n// or\nlaravel2js(php).then((res) =\u003e {})\njs2laravel(js).then((res) =\u003e {})\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flocize%2Flaravelphp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flocize%2Flaravelphp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flocize%2Flaravelphp/lists"}