Home » Php » Move data from one table with button to another table Laravel

Move data from one table with button to another table Laravel

Posted by: admin June 30, 2018 Leave a comment

Questions:

Before someone say this is a duplicate. Yes i have found this:

Move data from one MySQL table to another

But in Laravel its a bit different this is quiet that what i want. Like him i want a button wich delete a row in a tabel like this one:
(Updated picture)
Updated the picture

Just to have an example. After he hit the button it should move the shown row into the database just like it is shown here and delete it afterwards. I really dont know how to start something like this in laravel and i really cant find something related so if you need code snippets from what i have just tell me what you need. I appreciate every help thank you.

EDIT

Maybe this will make it more clearly:

$user_input = $request->userInput
$scores = DB::table('cd')
->join('customers', 'cd.fk_lend_id', '=', 'customer .lend_id')
->select('cd.fk_lend_id','cd.serialnumber','users.name', 'cd.created_at as lend on')
->where('cd.fk_lend_id',$request->$user_input)
->get();
Answers: