-3

actually i just learn about Vue.js and i have some knowledge using Laravel. I want to combine both of them, im searching for tutorials on internet and i found 2 kind of combination.

the first one is they separate Laravel and Vue, and the second one they combine both of them in Laravel Directory. Which one is the best for use guys? and can you guys tell me what is the benefits of each other? thank you so much.

  • This is entirely project dependent. Are you using Vue to enhance certain views? Are you using it to build a Single Page Application with a Laravel Backend? Are you using it to connect to a Laravel API? It's impossible to say without knowing what you want to use it for. – Lewis Apr 24 '19 at 12:25

1 Answers1

0

These are different types of frameworks. You can build a nice UI independently. Yes, you can use both together. In your case, the Laravel will be API backend.

That don't have to be SSR. A Vue.js project can work with any API backend if you can. For example, you have developed a CRM front-end. Its backend can develop using Laravel or .NET Core. Vue doesn't care about it.

If the returned results are the same, you don't need to spend more effort.

What's the SPA?

A single-page application works in the browser and requires no page reloads and no extra time for waiting. The page doesn’t need to be updated since the content is downloaded automatically.

You already use these types of applications every day. Twitter, Trello, Facebook, Gmail, etc.

Actually, if your project needs to Vue.js, use it. In this case, you should ask this question yourself, "Why do we need a Single Page Application?".

The answer to the second question, yes you can. But you don't need to put them to the same directory.

As I said, benefits depend on your project's needs. Enterprise applications are could want to have different microservices, layers, etc.

Laravel and similar frameworks helping these kinds of needs.

I hope these pieces of information could help you.

Why do we need a Single Page Applications

Single-page application vs. Multi-page application

Single Page Application: advantages and disadvantages

Ali
  • 1,358
  • 3
  • 21
  • 32