{"id":33968182,"url":"https://github.com/eduandebruijne/admin-bundle","last_synced_at":"2025-12-13T00:00:19.297Z","repository":{"id":44595321,"uuid":"428360923","full_name":"eduandebruijne/admin-bundle","owner":"eduandebruijne","description":"A simple to use Symfony based CMS","archived":false,"fork":false,"pushed_at":"2025-11-18T19:11:25.000Z","size":11740,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-18T21:06:54.483Z","etag":null,"topics":["admin","cms","symfony"],"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/eduandebruijne.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":"2021-11-15T17:34:29.000Z","updated_at":"2025-11-18T19:10:05.000Z","dependencies_parsed_at":"2023-01-21T17:18:16.586Z","dependency_job_id":"3a410cea-8c8a-4fbf-8c15-c77dde24ff17","html_url":"https://github.com/eduandebruijne/admin-bundle","commit_stats":{"total_commits":147,"total_committers":3,"mean_commits":49.0,"dds":"0.41496598639455784","last_synced_commit":"756f75c35cbbe546d6c800068296ee3326f2c539"},"previous_names":[],"tags_count":91,"template":false,"template_full_name":null,"purl":"pkg:github/eduandebruijne/admin-bundle","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eduandebruijne%2Fadmin-bundle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eduandebruijne%2Fadmin-bundle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eduandebruijne%2Fadmin-bundle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eduandebruijne%2Fadmin-bundle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eduandebruijne","download_url":"https://codeload.github.com/eduandebruijne/admin-bundle/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eduandebruijne%2Fadmin-bundle/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27695808,"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-12-12T02:00:06.775Z","response_time":129,"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":["admin","cms","symfony"],"created_at":"2025-12-13T00:00:18.088Z","updated_at":"2025-12-13T00:00:19.264Z","avatar_url":"https://github.com/eduandebruijne.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# EDBAdminBundle\n*A simple to use Symfony based CMS*\n\n\n## Installation Instructions\n\n#### Install using Composer\n\n```bash\ncomposer require eduandebruijne/admin-bundle\n```\n\n#### Create User Entity\n\n```php\n\u003c?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Entity;\n\nuse Doctrine\\ORM\\Mapping\\Entity;\nuse Doctrine\\ORM\\Mapping\\HasLifecycleCallbacks;\nuse EDB\\AdminBundle\\Entity\\AbstractUser;\n\n#[Entity]\n#[HasLifecycleCallbacks]\nclass User extends AbstractUser\n{\n}\n```\n\n#### Create Media Entity\n\n```php\n\u003c?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Entity;\n\nuse Doctrine\\ORM\\Mapping\\Entity;\nuse Doctrine\\ORM\\Mapping\\HasLifecycleCallbacks;\nuse EDB\\AdminBundle\\Entity\\AbstractMedia;\n\n#[Entity]\n#[HasLifecycleCallbacks]\nclass Media extends AbstractMedia\n{\n}\n```\n\n#### Update config in config/packages/security.yaml\n\n```yaml\nrole_hierarchy:\n    ROLE_ADMIN: ~\n\nproviders:\n    user:\n        entity:\n            class: App\\Entity\\User\n            property: username\n\nfirewalls:\n    main:\n        custom_authenticators:\n            - EDB\\AdminBundle\\Security\\GoogleAuthenticator\n        form_login:\n            provider: user\n            login_path: login\n            check_path: check_form_login\n            default_target_path: dashboard\n        entry_point: form_login\n        logout:\n            path: logout\n\naccess_control:\n    - { path: ^/%env(EDB_ADMIN_PATH)%/login, roles: PUBLIC_ACCESS }\n    - { path: ^/%env(EDB_ADMIN_PATH)%, roles: ROLE_ADMIN }\n```\n\n#### Use entities in config/packages/edb_admin.yaml\n\n```yaml\nedb_admin:\n    media_class: App\\Entity\\Media\n    user_class: App\\Entity\\User\n```\n\n#### Get ready\n\n* Make sure the `DATABASE_URL` in your `.env` file is correct\n* Create and update the database schema\n* Create your first admin user\n\n```bash\nbin/console doctrine:database:create --if-not-exists\nbin/console doctrine:schema:update --complete --force\nbin/console admin:create-user ROLE_ADMIN \u003crequired:username/email\u003e \u003coptional:password\u003e\n```\n\n#### Optionally: Create User Admin\n\n```php\n\u003c?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Admin;\n\nuse App\\Entity\\User;\nuse EDB\\AdminBundle\\Admin\\AbstractUserAdmin;\n\nclass UserAdmin extends AbstractUserAdmin\n{\n    public function getEntityClass(): string\n    {\n        return User::class;\n    }\n}\n\n```\n\n#### Optionally: Create Media Admin\n\n```php\n\u003c?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Admin;\n\nuse App\\Entity\\Media;\nuse EDB\\AdminBundle\\Admin\\AbstractMediaAdmin;\n\nclass MediaAdmin extends AbstractMediaAdmin\n{\n    public function getEntityClass(): string\n    {\n        return Media::class;\n    }\n}\n```\n\n## Other examples\n\n#### Example Page Entity\n\n```php\n\u003c?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Entity;\n\nuse Doctrine\\ORM\\Mapping\\Column;\nuse Doctrine\\ORM\\Mapping\\HasLifecycleCallbacks;\nuse EDB\\AdminBundle\\Entity\\BaseEntity;\nuse Doctrine\\ORM\\Mapping\\Entity;\n\n#[Entity]\n#[HasLifecycleCallbacks]\nclass Page extends BaseEntity\n{\n    #[Column(type: 'string')]\n    private ?string $title;\n\n    public function __toString(): ?string\n    {\n        return $this-\u003etitle;\n    }\n\n    public function getTitle(): ?string\n    {\n        return $this-\u003etitle;\n    }\n\n    public function setTitle(?string $title): void\n    {\n        $this-\u003etitle = $title;\n    }\n}\n```\n\n#### Example Page Admin\n\n```php\n\u003c?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Admin;\n\nuse App\\Entity\\Page;\nuse EDB\\AdminBundle\\Admin\\AbstractAdmin;\nuse EDB\\AdminBundle\\Admin\\AdminInterface;\nuse EDB\\AdminBundle\\FormBuilder\\FormCollection;\nuse EDB\\AdminBundle\\ListBuilder\\ListCollection;\nuse Symfony\\Component\\Form\\Extension\\Core\\Type\\TextType;\n\nclass PageAdmin extends AbstractAdmin implements AdminInterface\n{\n    public function buildForm(FormCollection $collection): void\n    {\n        $collection-\u003eadd('title', TextType::class);\n    }\n\n    public function buildList(ListCollection $collection): void\n    {\n        $collection-\u003eadd('title');\n    }\n\n    public static function getAdminMenuTitle(): string\n    {\n        return 'Pages';\n    }\n\n    public static function getEntityClass(): string\n    {\n        return Page::class;\n    }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feduandebruijne%2Fadmin-bundle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feduandebruijne%2Fadmin-bundle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feduandebruijne%2Fadmin-bundle/lists"}