response view with v-component

时间:2018-09-18 19:46:24

标签: php laravel vue.js

How can i load the v-component and v-component2 ?

1) in vue component 1

watch: {
    loader () {
        axios.post("/laravel_route", {
             param: value
        })
        .then (response => {
            $("#section").hmtl(response.data);
        })
    }
}

2) In controller of Laravel

public function laravel_route(Request $request){
    return view('anotherview', compact("request"));
}

3) In the another.view.blade.php

<v-component>
    <v-component2></v-component2>
</v-component>

1 个答案:

答案 0 :(得分:0)

我不相信您可以通过ajax渲染组件。