{"id":24488950,"url":"https://github.com/naoray/blueprint-nova-addon","last_synced_at":"2025-04-07T12:06:46.208Z","repository":{"id":43756247,"uuid":"255945799","full_name":"Naoray/blueprint-nova-addon","owner":"Naoray","description":"A Blueprint addon which generates Nova resources","archived":false,"fork":false,"pushed_at":"2023-08-01T12:20:59.000Z","size":98,"stargazers_count":71,"open_issues_count":7,"forks_count":38,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-31T10:08:26.427Z","etag":null,"topics":["blueprint","laravel","nova"],"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/Naoray.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"publiccode":null,"codemeta":null},"funding":{"github":"Naoray","patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2020-04-15T14:41:09.000Z","updated_at":"2024-09-18T19:39:19.000Z","dependencies_parsed_at":"2024-06-19T04:12:45.631Z","dependency_job_id":"00a081d8-9443-4894-87ff-a4ea53cc2ef9","html_url":"https://github.com/Naoray/blueprint-nova-addon","commit_stats":{"total_commits":73,"total_committers":8,"mean_commits":9.125,"dds":0.6575342465753424,"last_synced_commit":"f6cc611e328791bbf37ef86a517cb98397122267"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Naoray%2Fblueprint-nova-addon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Naoray%2Fblueprint-nova-addon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Naoray%2Fblueprint-nova-addon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Naoray%2Fblueprint-nova-addon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Naoray","download_url":"https://codeload.github.com/Naoray/blueprint-nova-addon/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247648977,"owners_count":20972945,"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":["blueprint","laravel","nova"],"created_at":"2025-01-21T16:30:07.844Z","updated_at":"2025-04-07T12:06:46.181Z","avatar_url":"https://github.com/Naoray.png","language":"PHP","funding_links":["https://github.com/sponsors/Naoray"],"categories":[],"sub_categories":[],"readme":"# Blueprint Nova Addon\n\n![Build Status](https://travis-ci.org/Naoray/blueprint-nova-addon.svg?branch=master)\n[![Total Downloads](https://img.shields.io/packagist/dt/naoray/blueprint-nova-addon.svg?style=flat)](https://packagist.org/packages/naoray/blueprint-nova-addon)\n\n:mega: Shoutout to [Jason McCreary](https://github.com/jasonmccreary) whose [Blueprint](https://github.com/laravel-shift/blueprint) package lays the groundwork for this small addon. Thank you Jason :raised_hands:\n\nInstalling this addon will allow you to generate your Nova resources with the `php artisan blueprint:build` command.\n\n## Installation\nYou can install this package and **Blueprint** via composer:\n\n```bash\ncomposer require --dev naoray/blueprint-nova-addon\n```\n\n\u003e :warning: You need to have [laravel nova](https://nova.laravel.com/) installed in order for the resource generation to take place!\n\n## Usage\nRefer to [Blueprint's Basic Usage](https://github.com/laravel-shift/blueprint#basic-usage) to get started. Afterwards you can run the `blueprint:build` command to generate Nova resources automatically. To get an idea of how easy it is you can use the example `draft.yaml` file below.\n\n```yaml\n# draft.yaml\nmodels:\n  Post:\n    author_id: id foreign:users\n    title: string:400\n    content: longtext\n    published_at: nullable timestamp\n    relationships:\n      HasMany: Comment\n\n  Comment:\n    post_id: id foreign\n    content: longtext\n    published_at: nullable timestamp\n```\n\nFrom these 13 lines of YAML, this addon will generate 2 Nova resources which are pre-filled with 14 fields.\n\n```php\n// App/Nova/Comment.php\npublic function fields(Request $request)\n{\n    return [\n        ID::make()-\u003esortable(),\n\n        Textarea::make('Content')\n            -\u003erules('required', 'string'),\n\n        DateTime::make('Published at'),\n\n        BelongsTo::make('Post'),\n\n        DateTime::make('Created at'),\n        DateTime::make('Updated at'),\n    ];\n}\n\n// App/Nova/Post.php\npublic function fields(Request $request)\n{\n    return [\n        ID::make()-\u003esortable(),\n\n        Text::make('Title')\n            -\u003erules('required', 'string', 'max:400'),\n\n        Textarea::make('Content')\n            -\u003erules('required', 'string'),\n\n        DateTime::make('Published at'),\n\n        BelongsTo::make('Author', 'author', User::class),\n\n        HasMany::make('Comments'),\n\n        DateTime::make('Created at'),\n        DateTime::make('Updated at'),\n    ];\n}\n```\n\n## Configuration\nYou may publish the configuration with the following command:\n\n```bash\nphp artisan vendor:publish --tag=nova_blueprint\n```\n\n### Timestamp fields\nTo disable the generation of `timestamp` fields for all Nova resources set this option to `false`.\n\n## Testing\n\n``` bash\ncomposer test\n```\n\n## Changelog\n\nPlease see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.\n\n## Contributing\n\nPlease see [CONTRIBUTING](CONTRIBUTING.md) for details.\n\n## Security\n\nIf you discover any security related issues, please email krishan.koenig@gmail.com instead of using the issue tracker.\n\n## Credits\n\n- [Krishan König](https://github.com/naoray)\n- [All Contributors](../../contributors)\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnaoray%2Fblueprint-nova-addon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnaoray%2Fblueprint-nova-addon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnaoray%2Fblueprint-nova-addon/lists"}