S
S
sv82016-10-09 23:40:30
Laravel
sv8, 2016-10-09 23:40:30

How to properly use laravel in conjunction with vue.js?

Good afternoon everyone!
Trying vue.js with laravel. I liked the idea of ​​components, that one component contains everything you need:

<template>
...
</template>
<scripts>
...
</scripts>
<styles>
...
</styles>

But in the course of the study, the following questions arose.
Let's say I want to create a component for adding a specific record to the database (normal form).
1. How can I use blade + helpers in a section <template>?
Let's say I want to create a form using a helper:
{!! Form::open(...) !!}
2. How can I use SCSS in a section <styles>?
I read that it is possible to set the preprocessor through the 'lang' attribute, but I did not find a working example of the implementation of this task.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alex Wells, 2016-10-10
@Alex_Wells

And why do you need a blade? If you use Vue, then you don't need a blade at all. Unless to display the base template, everything else is loaded via JS. This is how it's done in Angular, and should be done here as well, but I could be wrong.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question