javascript - How to achieve complete separation of front-end and back-end development when using Laravel and Vue
黄舟
黄舟 2017-05-16 13:05:52
0
4
944

This is the most basic question, but I have been studying on my own and don’t have any relevant experience. I hope the big guys won’t take offense...

Laravel5.4 + vue2.

Although Laravel comes with a set of vue development methods, the front-end code is written in the resource/assets directory and built into the public directory through mix. However, this approach also involves coupling. What I want is separation. It has to be clean and tidy. I write the back-end code here, and they use vue-cli to build scaffolding over there and then write the front-end code under that scaffolding. After writing, a dist is generated, and the dist is copied directly and it is deployed.

Should such a requirement be achieved? I have also searched a lot of open source DEMOs, but they are not like this. Please help.

黄舟
黄舟

人生最曼妙的风景,竟是内心的淡定与从容!

reply all(4)
黄舟

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

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template