Download the PHP package simpleforyou/yii2-and-vue without Composer
On this page you can find all versions of the php package simpleforyou/yii2-and-vue. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download simpleforyou/yii2-and-vue
More information about simpleforyou/yii2-and-vue
Files in simpleforyou/yii2-and-vue
Package yii2-and-vue
Short Description Yii 2 and Vue Basic Project Template
License BSD-3-Clause
Homepage http://www.yiiframework.com/
Informations about the package yii2-and-vue
Yii2 and Vue Project
You can use this template to create a website with yii2 and vuejs.
composer create-project --prefer-dist simpleforyou/yii2-and-vue basic
Directory Structure
assets/ contains assets definition (NOT NEEDED)
commands/ contains console commands (controllers)
config/ contains application configurations
controllers/ contains Web controller classes
mail/ contains view files for e-mails
models/ contains model classes
runtime/ contains files generated during runtime
tests/ contains various tests for the basic application
vendor/ contains dependent 3rd-party packages
views/ contains view files for the Web application
web/ contains the entry script and Web resurces
src/ contains helper classes
web/vue contains the entry vue script part (Do not upload this folder to your web server)
Controllers
The use of the controllers is now different. Before, the controllers rendered a page or template. Now the controllers only return data because the views are changed by vue.
Views
Due to the changes only 2 files are needed now. The main layout and an index page. In both files the VueRenderer will be called which contains the js files and css files
web/vue
this folder is the vue project.
How to use for production
-
run the build script in
web/vue/package.json
. After the build process is complete a new folder will be created under web theprod
folder. This folder contains all the files built for vue. - Upload the prod folder to your web folder on your server.
All versions of yii2-and-vue with dependencies
yiisoft/yii2 Version ~2.0.43
yiisoft/yii2-swiftmailer Version ~2.0.0 || ~2.1.0