How to display inertial data to a Vue component?
P粉517475670
P粉517475670 2023-10-31 12:54:15
0
1
504

In the Vue Inspector I actually get the message, but I'm not sure how to use it on the Vue component.

Please view the picture link

https://ibb.co/2KTmstS

I'm using Inertia helper methods and sending messages to Vue components but nothing works.

public function contact_to_project(){
    $message = "My message!";
    return Inertia('Contact_to_project', [
        'message' => $message
    ]);

}

My Vue component

<template> {{message}}</template>


<script>
  export default {
     props: {
        message: String,
     },
  }
</script>


P粉517475670
P粉517475670

reply all(1)
P粉743288436

Based on your question in vue component, you can define the data as props and then you can display it in template as shown below Example below:

sssccc

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