这算是个最基础的问题啦, 但是我一直在自学没有一点点相关的经验, 希望大佬们不要见怪...
Laravel5.4 + vue2.
虽然Laravel自带了一套vue的开发方式, 在resource/assets目录下写前端代码, 通过mix构建到public目录下. 但是这样的做法也是带有耦合的, 我想要的是, 分离得干干净净的, 我在这边写后端代码, 他们在那边用vue-cli搭建脚手架后在在那个脚手架下写前端代码, 写完后生成dist, dist直接复制过来就算部署好了.
这样的需求应该能做到吧? 我也搜了很多开源的DEMO, 但是都不是这样的. 求助.
I made it out of boredom on May Day, you can take a look
github
The form of vue + laravel api is enough. This is the case in our company at present. Laravel is used to write the api and backend management system. Colleagues in the vue front-end team are responsible for calling the interface through the api document. This method is more suitable for mobile projects
Yes, no matter you use larvael or yii framework, the front-end and back-end separation method is that the back-end provides API to return json data. Vue is used as the front end. When you first start developing, you can use mock data to simulate the interface data returned by the back end. When the interface is ready, then replace all requests to the URL provided by the backend.
Write the interface document, implement the backend, and call the frontend