Saving data for editing on a Laravel page can be achieved by leveraging the powerful features

I have implemented my create page using vue.js. I called the vue.js file using a component. Now, for the edit page, I followed the same procedure by calling the vue component in the blade. However, I am unsure how to save data for the edit page. Can anyone provide assistance with this?

@extends('layouts.main')

@section('content')

<div class="justpaddingside" role="main">
    <div class="row w-100 Bfont ">
        <div class="col-xs-12">
            <div class="havence-content">
                <div class="havence-content-header"></div>
                   <div class="row w-100">
                        <div class="col-md-12">
                            <div class="pillbutton bge">
                                <div class="x_title" >
                                    <img src="https://img.icons8.com/bubbles/50/000000/important-mail.png" class="rounded float-left" >  
                                    <h2 class="p-3 font-weight-bold">Edit Email Reminder</h2> 
                                    <h4 class="text-right">{{date('d-m-Y')}}</h4>
                                    <h5 class="text-right">{{date('H:i:s')}}</h5>
                                    <div class="clearfix"></div>
                                    <div class="x_content p-5">

                                    <div id="app">
                                        <a class= "float-right" href="{{ route('havence.automail.index') }}"> 
                                            <img src="https://img.icons8.com/color/48/000000/close-window.png">
                                        </a>
                                        <email-component
                                            {{-- email_creation_link="{{ route('email.create') }}"
                                            email_index_route="{{ route('havence.automail.index') }}" --}}
                                            email_edit_route="{{ route('havence.automail.edit',['id'=>$mailTemplates->id]) }}"
                                            :conditions="{{ json_encode($conditions) }}"
                                            :modules="{{ json_encode($modules) }}"
                                            :mailtemplates="{{json_encode($mailTemplates)}}"
                                        >
                                        </email-component>
                                        <button type="button" class="btn btn-success buttonCS col-md-12" data-dismiss="modal">Update</button>


                                    </div>



                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
@endsection

@push('stylesheets')
    <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/v/dt/dt-1.10.16/datatables.min.css"/>
    <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.5/css/select2.min.css">
@endpush

@push('scripts')
    <script type="text/javascript" src="https://cdn.datatables.net/v/dt/dt-1.10.16/datatables.min.js"></script>
    <script src="https://unpkg.com/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="f18286949485909d948385c3b1c6dfc0c8dfc2">[email protected]</a>/dist/sweetalert2.all.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.5/js/select2.min.js"></script>
@endpush

@section('page-js')
    <script>

        var typingTimer=null;                //timer identifier
        var doneTypingInterval = 200;  //time in ms, 5 second for example

    </script>
@endsection

Above is the code snippet of my edit page. Any guidance on how to handle data saving in this scenario would be greatly appreciated.

I've been searching for a solution without success so far. Your help is much appreciated!

Thank you!

Answer №1

You can transfer information from a form to PHP by utilizing the POST method. Once the data is collected, you have the option to submit the form or access an API for further processing.

For more information, check out this video: https://www.youtube.com/watch?v=l0RB0VkvEIE

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Webpack returns an undefined error when attempting to add a JavaScript library

I am a newcomer to webpack and I am attempting to incorporate skrollr.js into my webpack setup so that I can use it as needed. However, I am unsure of the correct approach for this. After some research, I have found that I can either use an alias or export ...

Change the div attribute when clicking on a corresponding link

For the full code, please visit: https://plnkr.co/edit/6TTLVcsXLV7C1qXSMQV0?p=preview Here is an angular ui bootstrap accordion with nested panels: <uib-accordion close-others="oneAtATime"> <div ng-repeat="sub in subdivisions"> < ...

Creating linear overlays in Tailwind CSS can be achieved by utilizing the `bg-gradient

Is there a way to add a linear background like this using Tailwind CSS without configuring it in tailwind.config.js? The image will be fetched from the backend, so I need the linear effect on the image from bottom to top with a soft background. Here are ...

Troubleshooting problems with hosting create-react-app on IIS and Internet Explorer

Having some trouble setting up my React application that was built using the React Create App template. When trying to host it with IIS, I encountered some issues. The index.html main page seems to be loading fine, but the compiled JS file is not loading ...

Add a fresh category to a JSON document

Combining Express (Node.js) and Mongoose, I am developing a REST API and attempting to implement JWT token-based login. However, I have encountered an issue. Upon executing the code below: const mongoose = require('mongoose'); const User = mongo ...

Aligning container divs at the center in various screen resolutions

I recently constructed a portfolio website using Bootstrap and Isotope JS. In my layout, I have a container div which works perfectly when viewed on a desktop browser - displaying 3 divs in one line. However, the issue arises when the resolution changes an ...

What is the solution for the red underline issue with the @json Blade directive in VSC?

Everything seems to be functioning correctly with these variables, but I'm curious as to why they are underlined in red. Does anyone have a solution for this issue? Error message ...

Display an image in an Angular application using a secure URL

I am trying to return an image using a blob request in Angular and display it in the HTML. I have implemented the following code: <img [src]="ImageUrl"/> This is the TypeScript code I am using: private src$ = new BehaviorSubject(this.Url); data ...

AJAX: Bringing in new content to display beneath the triggering page

Here is the code for my main page: <head> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script> <style type="text/css"> div { width:100%; ...

Transitioning between states in React with animation

In my React application, I have a menu that contains a sub-menu for each item. Whenever an item is clicked, the sub-menu slides in and the title of the menu changes accordingly. To enhance user experience, I aim to animate the title change with a smooth fa ...

jquery plugin causing issues with bootstrap button functionality

Currently, I am utilizing the jQuery form plug-in to post my form in an Ajax way. The post function is functioning perfectly with the default button. However, it seems to encounter issues when I try to use a custom Bootstrap button as shown below. Could so ...

Obtain Page Parameters within a Nested Next.js Layout using App Router

My Next.js App Router has a nested dynamic page structure using catchall routes configured like this: app/stay/ |__[...category] | |__page.js |__[uid] | |__page.js |__layout.js Within the 'layout.js' file, there is a con ...

Guide to creating an asynchronous function

Starting my first react website and needing assistance with writing an asynchronous JavaScript function. I am currently working on uploading user input files to firebase storage and then making a post request to the API in order to store the data in the da ...

How come I am unable to activate the input file using prop?

Attempting to access a selection of files by passing a prop to a component for convenience. Is there a method to achieve this? https://codepen.io/iliyazelenko/pen/RBejRV?editors=1010 The code snippet below does not meet my requirements: <input type ...

Ways to determine the total amount of days in a given month

As I create a countdown timer, the process involves determining the remaining days in a given month by subtracting the current date from the total number of days in that month. For instance, if there are 30 days in September and 8 days have already passe ...

Encountering difficulties displaying navigation interface with react native navigation's stack navigator

I am trying to implement a custom side navigation bar in React Navigation without using drawerNavigator. I have fixed the side nav bar and bottom bar in app.js so that they appear on all screens. The main content area should change based on button clicks o ...

Version 13 of the Discord slash command encounters an "interaction failed" error

After implementing the slash commands in Discord v13 as per the instructions on discordjs.guide, I encountered an issue when trying to use the commands - interaction failed. Here is a snippet of my code: // Here goes the code const { Client, Collection, ...

Issue with window.getSelection() function in Mozilla Firefox

I have implemented code to retrieve the window.getSelection() and assign it to a variable in order to store the current focusNode and offset when the contenteditable div onBlur event is triggered. This functionality works as expected in the Chrome browse ...

Customizing the Header Navigation in Vue App.vue Across Various Views

Struggling to find the best approach for managing a header navigation in Vue 2 using Vuex with VueRouter. The main issue is creating a dynamic 'header' type navigation in App.vue. <div id="nav"> <!--Trying to create a dynamic ...

Ways to include x-api-key in Angular API request headers

I am attempting to include the x-api-key header in the headers, as shown below: service.ts import { Injectable } from '@angular/core'; import { Http, Headers, RequestOptions, Response } from '@angular/http'; import { Observable } from ...