{"id":19662357,"url":"https://github.com/axeldotdev/content-blocks","last_synced_at":"2025-06-15T23:06:45.871Z","repository":{"id":41871488,"uuid":"458665744","full_name":"axeldotdev/content-blocks","owner":"axeldotdev","description":"A Laravel Nova field for flexible content blocks.","archived":false,"fork":false,"pushed_at":"2023-10-09T14:55:58.000Z","size":244,"stargazers_count":2,"open_issues_count":5,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-27T03:23:40.096Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"CSS","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/axeldotdev.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":".github/SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"axeldotdev"}},"created_at":"2022-02-12T23:41:54.000Z","updated_at":"2023-04-26T14:09:35.000Z","dependencies_parsed_at":"2024-11-11T16:10:55.576Z","dependency_job_id":"ddf3ed9f-66b8-4e36-a64a-05ad6ca3a255","html_url":"https://github.com/axeldotdev/content-blocks","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/axeldotdev/content-blocks","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/axeldotdev%2Fcontent-blocks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/axeldotdev%2Fcontent-blocks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/axeldotdev%2Fcontent-blocks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/axeldotdev%2Fcontent-blocks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/axeldotdev","download_url":"https://codeload.github.com/axeldotdev/content-blocks/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/axeldotdev%2Fcontent-blocks/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260063448,"owners_count":22953533,"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":[],"created_at":"2024-11-11T16:10:50.432Z","updated_at":"2025-06-15T23:06:45.833Z","avatar_url":"https://github.com/axeldotdev.png","language":"CSS","funding_links":["https://github.com/sponsors/axeldotdev"],"categories":[],"sub_categories":[],"readme":"# Content Blocks\n\n[![Latest Version on Packagist](https://img.shields.io/packagist/v/axeldotdev/content-blocks.svg?style=flat-square)](https://packagist.org/packages/axeldotdev/content-blocks)\n[![GitHub Tests Action Status](https://img.shields.io/github/workflow/status/axeldotdev/content-blocks/run-tests?label=tests)](https://github.com/axeldotdev/content-blocks/actions?query=workflow%3Arun-tests+branch%3Amain)\n[![GitHub Code Style Action Status](https://img.shields.io/github/workflow/status/axeldotdev/content-blocks/Check%20\u0026%20fix%20styling?label=code%20style)](https://github.com/axeldotdev/content-blocks/actions?query=workflow%3A\"Check+%26+fix+styling\"+branch%3Amain)\n[![Total Downloads](https://img.shields.io/packagist/dt/axeldotdev/content-blocks.svg?style=flat-square)](https://packagist.org/packages/axeldotdev/content-blocks)\n[![License](https://img.shields.io/packagist/l/axeldotdev/content-blocks.svg?style=flat-square)](https://packagist.org/packages/axeldotdev/content-blocks)\n\nA Laravel Nova field for flexible content blocks.\n\n## Installation\n\nYou can install the package via composer:\n\n```bash\ncomposer require --dev axeldotdev/content-blocks\n```\n\nThe minimum PHP version required is **8.1**.\n\n## Usage\n\nYou can use it like that:\n\n```php\n\\Axeldotdev\\ContentBlocks\\ContentBlocks::make('Content')\n    -\u003eaddButtonLabel('Add block')\n    -\u003eaddBlock(\\App\\Nova\\Blocks\\TextBlock::class)\n    -\u003eaddBlock(\\App\\Nova\\Blocks\\ImageBlock::class)\n    -\u003eaddBlock(\\App\\Nova\\Blocks\\VideoBlock::class),\n```\n\n```php\n// app/Nova/Blocks/TextBlock.php\n\nnamespace App\\Nova\\Blocks;\n\nuse Axeldotdev\\ContentBlocks\\Block;\n\n class TextBlock extends Block\n {\n     public function fields(): array\n     {\n         return [];\n     }\n\n     public function label(): string\n     {\n         return __('Text');\n     }\n\n     public function template(): string\n     {\n         return 'blocks.text';\n     }\n\n     public function viewData(): array\n     {\n         return [];\n     }\n }\n```\n\n## Testing\n\n```bash\ncomposer test\n```\n\n## Changelog\n\nPlease see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.\n\n## Contributing\n\nPlease see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.\n\n## Security Vulnerabilities\n\nPlease review [our security policy](../../security/policy) on how to report security vulnerabilities.\n\n## Credits\n\n- [Axel Charpentier](https://github.com/axeldotdev)\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%2Faxeldotdev%2Fcontent-blocks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faxeldotdev%2Fcontent-blocks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faxeldotdev%2Fcontent-blocks/lists"}