{"id":21771719,"url":"https://github.com/naffiq/yii2-bridge","last_synced_at":"2025-04-13T16:41:57.935Z","repository":{"id":57023255,"uuid":"96116416","full_name":"naffiq/yii2-bridge","owner":"naffiq","description":"⚠️ REPO MOVED TO SEPARATE GROUP FOR MAINTAINABILITY","archived":false,"fork":false,"pushed_at":"2018-06-07T12:22:54.000Z","size":596,"stargazers_count":4,"open_issues_count":9,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-27T07:35:53.732Z","etag":null,"topics":["admin","admin-dashboard","admin-panel","cmf","cms","crud","generator","gii","yii2"],"latest_commit_sha":null,"homepage":"https://github.com/yii2-bridge/core","language":"PHP","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/naffiq.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}},"created_at":"2017-07-03T13:55:51.000Z","updated_at":"2018-11-21T08:55:03.000Z","dependencies_parsed_at":"2022-08-23T12:20:23.006Z","dependency_job_id":null,"html_url":"https://github.com/naffiq/yii2-bridge","commit_stats":null,"previous_names":[],"tags_count":46,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/naffiq%2Fyii2-bridge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/naffiq%2Fyii2-bridge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/naffiq%2Fyii2-bridge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/naffiq%2Fyii2-bridge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/naffiq","download_url":"https://codeload.github.com/naffiq/yii2-bridge/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248747353,"owners_count":21155438,"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":["admin","admin-dashboard","admin-panel","cmf","cms","crud","generator","gii","yii2"],"created_at":"2024-11-26T14:18:14.034Z","updated_at":"2025-04-13T16:41:57.912Z","avatar_url":"https://github.com/naffiq.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Yii2 Bridge [![Build Status](https://travis-ci.org/naffiq/yii2-bridge.svg?branch=master)](https://travis-ci.org/naffiq/yii2-bridge) [![Maintainability](https://api.codeclimate.com/v1/badges/179010503a3350d57f81/maintainability)](https://codeclimate.com/github/naffiq/yii2-bridge/maintainability)\n\n![Yet another admin panel](https://raw.githubusercontent.com/naffiq/yii2-bridge/master/src/assets/dist/bridge.jpg)\n\n### [Краткое введение и туториал на русском](http://telegra.ph/Yii2-Bridge-03-26)\n\nBridge delivers you simple content management system that utilizes best production-tested\ncomponents and plugins for Yii2.\n\n## Installation\n\nAdd it as Composer dependency by running\n```bash\n$ composer require naffiq/yii2-bridge\n```\n\n####  Be sure to configure module (instructions below), before running migrations.\n\n## Configuration\n\nAdd module declaration to your config file for web config:\n```php\n\u003c?php\n\nreturn [\n    // ... your config\n    'modules' =\u003e [\n        'admin' =\u003e [\n            'class' =\u003e '\\naffiq\\bridge\\BridgeModule',\n            // Add your projects modules here to keep right routing.\n            'modules' =\u003e [\n                'customModule' =\u003e ['class' =\u003e '\\app\\modules\\your\\CustomModule']\n            ],\n            // Add menu item of your content management module to menu\n            'menu' =\u003e [\n                [\n                    'title' =\u003e 'Content',\n                    'url' =\u003e ['/admin/content/default/index'],\n                    'active' =\u003e ['module' =\u003e 'content'],\n                    'icon' =\u003e 'list'\n                ]\n            ],\n            // Alternatively you can define different menu items for different\n            // roles. In that case it will override default menu items, such as\n            // settings, users and dashboard\n            'composeMenu' =\u003e function ($user, $roles, $authManager) {\n                 /**\n                  * @var \\yii\\web\\User $user \n                  * @var \\Da\\User\\Model\\Role[] $roles\n                  * @var \\Da\\User\\Component\\AuthDbManagerComponent $authManager \n                  */\n                 if (isset($roles['admin'])) {\n                     return require __DIR__ . '/menu-admin.php';\n                 }\n                 if ($user-\u003ecan('editor')) {\n                     return require __DIR__ . '/menu-editor.php';\n                 }\n                 if (in_array($user-\u003eid, $authManager-\u003egetUserIdsByRole('manager'))) {\n                     return require __DIR__ . '/menu-manager.php';\n                 }\n                 // Or any other available method\n                 \n                 return __DIR__ . '/menu-default.php';\n            }\n        ]\n    ],\n    'bootstrap' =\u003e [        \n        'admin' // add module id to bootstrap for proper aliases and url routes binding\n    ]\n];\n\n```\n\nAnd for console config, in order to run migrations:\n\n```php\n\u003c?php\nreturn [\n    // ... your config\n    'modules' =\u003e [\n        'admin' =\u003e ['class' =\u003e '\\naffiq\\bridge\\BridgeModule']\n    ],\n    'bootstrap' =\u003e [        \n        'admin' // add module id to bootstrap for proper aliases and url routes binding\n    ]\n]; \n\n```\n\n\n## Setup\n\nAfter installing and config setup (including database), you should have installation\nexecutable in your vendor folder. You can run all the migrations required with single \ncommand:\n\n```bash\n$ ./vendor/bin/bridge-install\n```\n\n\u003e Warning! This command is running with `--interactive=0` flag, which means it will not ask\nconfirmation for it.\n\n## Usage\n\nAfter running every step above you should have your admin panel running on `/admin` route.\nThe only thing left is to run command to create users. \n\n### Creating first user\n\nRun following command to generate users:\n```bash\n$ php yii user/create EMAIL USERNAME PASSWORD ROLE \n```\n\nSo the correct command to create user with admin role for admin panel would be:\n```bash\n$ php yii user/create admin@sitename.kz admin PASSWORD admin\n``` \n\n## Gii\n\nGii that is provided with bridge is packed with some improvements to basic gii.\nWhen generating model with db fields ending by `image` or `file`, it would\nautomatically add corresponding upload behavior.\nYou can turn this behaviors off by clicking on checkbox in generator interface.\n\nAnd also it has `Bridge CRUD generator`, which will generate necessary fields \ninputs and display it nicely to the index table.  \n\n## Development and testing\nConfigure your `.env` (refer to `.env.example`). Run migrations with:\n```bash\n$ ./bin/bridge-install-dev\n```\n\nBridge comes with console app for development and testing purposes, located in `bin` folder.\nYou can simply execute it with\n```bash\n$ php bin/yii.php CONTROLLER/ACTION [params]\n``` \n\nTest package with\n```bash\n$ ./vendor/bin/phpunit\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnaffiq%2Fyii2-bridge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnaffiq%2Fyii2-bridge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnaffiq%2Fyii2-bridge/lists"}