Open TiaNex-Com opened 4 years ago
What do you mean by "add backend"?
just like the backend of yii2-app-advanced
In a similar way i.e. create another entry point etc. but there's almost no need for it in Yii 3 since it's way more flexible about directory structure.
@samdark Could you please describe how we might reorganize a large Yii2 advanced app (backend, frontend, console, and single vendor folder) into a directory structure that is recommended for Yii3? I am reviewing https://github.com/yiisoft/app and this demo, but it is not clear what the migration path is from a Yii2 advanced app to Yii3 single app.
Would each of our top level apps sit side-by-side, each using the Yii3 single app directory structure, so that backend and frontend can each have config/ and a public/ entry point? If that is done, would there need to be multiple sets of vendor/ and composer.json for each of our backend and frontend apps? That seems like a lot of redundancy, though flexible.
Also, we rely heavily on the Yii2 concept of modules and routing with a tiered structure: app > modules > controllers. I see in the demo that src/ has Blog/, and the config/routes.php has a Route Group of /blog and several Blog/*Controller entries named specifically. In Yii3 Routing, is there a concept of pattern matching of a URI path part to a src/ subdirectory "module" and Controller without specifically naming them all in routes.php? Could you provide an example of this pattern structure? This is unclear from https://github.com/yiisoft/router. Thank you.
We recently added host support to the router, now you can split the admin (aka backend) by specifying the host. For example:
Group::create()->routes(
// your admin routes here.
)->host('admin.{_host}') // just use FastRoute pattern
Will documentation be provided for how to manually migrate a former Yii2 advanced application template to a Yii3 single application?
@jasonkovacs-tim eventually.
start a new project? any suggestions?
What steps will reproduce the problem?
What is the expected result?
What do you get instead?
Additional info