{"id":26233601,"url":"https://github.com/mpstr24/laravel-interface-generator","last_synced_at":"2026-04-13T12:01:24.741Z","repository":{"id":279294374,"uuid":"934407545","full_name":"MPSTR24/laravel-interface-generator","owner":"MPSTR24","description":"Laravel package that aims to generate Typescript Interfaces from your Project's models/migrations.","archived":false,"fork":false,"pushed_at":"2025-03-12T20:14:18.000Z","size":90,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-27T22:44:12.239Z","etag":null,"topics":["interface-builder","laravel","laravel-package","php8","typescript"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":false,"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/MPSTR24.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-02-17T19:25:32.000Z","updated_at":"2025-03-12T20:14:21.000Z","dependencies_parsed_at":null,"dependency_job_id":"3dbd04a9-0a3c-4ae3-8388-c30cdd2842f1","html_url":"https://github.com/MPSTR24/laravel-interface-generator","commit_stats":null,"previous_names":["mpstr24/laravel-interface-generator"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/MPSTR24/laravel-interface-generator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MPSTR24%2Flaravel-interface-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MPSTR24%2Flaravel-interface-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MPSTR24%2Flaravel-interface-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MPSTR24%2Flaravel-interface-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MPSTR24","download_url":"https://codeload.github.com/MPSTR24/laravel-interface-generator/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MPSTR24%2Flaravel-interface-generator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31751705,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-13T09:16:15.125Z","status":"ssl_error","status_checked_at":"2026-04-13T09:16:05.023Z","response_time":93,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["interface-builder","laravel","laravel-package","php8","typescript"],"created_at":"2025-03-13T01:16:41.774Z","updated_at":"2026-04-13T12:01:24.720Z","avatar_url":"https://github.com/MPSTR24.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Laravel Interface Generator\n\nThis package is designed to automatically generate TypeScript interfaces from your Laravel models. It supports generating interfaces based on either model fillables or database migrations, it will also try to include relationships by analysing your model methods.\n\n\u003e **Note:** This package has been primarily tested with MySQL. SQLite and other drivers are a work in progress.\n\n![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/mpstr24/laravel-interface-generator/run-tests.yml?branch=main)\n![Packagist Version](https://img.shields.io/packagist/v/mpstr24/laravel-interface-generator)\n![Packagist Downloads](https://img.shields.io/packagist/dt/mpstr24/laravel-interface-generator)\n\n## Features\n\n- Interface Generation: Automatically generate TypeScript interfaces from Laravel\n    - Generates interfaces from your model's fillable attributes or from your model's database migration.\n- Relationship Detection: Automatically includes relationships in your interfaces.\n  - With the ability to disable this feature.\n  - Currently working with:\n    - [x] HasOne\n    - [x] HasMany\n    - [x] BelongsTo\n    - [x] BelongsToMany\n    - [x] MorphMany\n    - [x] MorphTo\n- Customisable Suffix: Ability to customise or remove a suffix to each interface.\n- Model Targeting: Ability to generate interfaces on all or specific models.\n## Installation\n\nInstall the package via Composer:\n\n```bash\ncomposer require mpstr24/laravel-interface-typer\n```\n\n\n\n## Usage/Examples\n\nBasic usage.\nRun the following to generate interfaces from your migrations with the default suffix \"Interface\":\n\n```bash\nphp artisan generate:interfaces\n```\n\n### Mode Options\nYou can choose between generating interfaces from migrations or fillables using the --mode (or -M) option.\n\n- Fillables Mode:\n```bash\nphp artisan generate:interfaces --mode=fillables\n```\n\n- Migrations Mode:\n\n```bash\nphp artisan generate:interfaces --mode=migrations\n```\n\n### Suffix Options\nCustomise the suffix added to your generated interface names using the --suffix (or -S) option.\n\n- Custom Suffix (default \"Interface\"):\n```bash\nphp artisan generate:interfaces --suffix=Interface\n```\n\n- No Suffix:\n```bash\nphp artisan generate:interfaces --suffix=\n```\n\n### Model Selection\nTo generate an interface for a specific model, please use the --model option. If not used or set to all, all models within the \"app/Models\" directory will be generated.\n\n- Specific Model\n```bash\nphp artisan generate:interfaces --model=TestUser\n```\n\n- All Models\n\n```bash\nphp artisan generate:interfaces --model=all\n```\n\nOr alternatively.\n\n```bash\nphp artisan generate:interfaces\n```\n\n### Relationship Toggling\nYou may not want to always generate relationships in your interfaces, to turn this off please use --relationships=False.\n\n- Relationships enabled (leave blank or set \"True\")\n```bash\nphp artisan generate:interfaces --relationships=True\n```\n\n- Relationships disabled\n\n```bash\nphp artisan generate:interfaces --relationships=False\n```\n\nOr alternatively.\n\n```bash\nphp artisan generate:interfaces\n```\n\n## Roadmap\n\n- [ ] Better Model discovery\n- [ ] Better relationship discovery\n- [ ] Finalising unknown types within mapping\n- [x] Adding of morphTo\n- [ ] Configuration file for wider and customisable default settings\n- [ ] Interface export options\n- [x] Testing to be implemented\n- [x] Testing to be improved\n- [ ] SQLite testing\n- [ ] Mapping separation for separate DB drivers\n- [ ] Finish remaining relationship types\n  - [ ] HasOneThrough\n  - [ ] HasManyThrough\n  - [ ] MorphOne\n  - [ ] MorphToMany\n  - [ ] MorphedByMany\n- [x] Larastan goals\n  - [x] 5\n  - [x] 6\n  - [x] 7\n  - [x] 8\n  - [x] 9\n\n\n## License\n\n[MIT](https://choosealicense.com/licenses/mit/)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmpstr24%2Flaravel-interface-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmpstr24%2Flaravel-interface-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmpstr24%2Flaravel-interface-generator/lists"}