vendredi 30 novembre 2018

Laravel - Archiving Data, Delete and Insert to another Table

When I click the button delete I want to delete the data and insert it to another table which is the archive how can I do it?

Here is my Destroy Public Function:

public function destroy($id)
{
    $client = Client::find($id);
    $client->delete();

}

My Store Public Function:

$client = new Client;
$client->client_code = $request->input('client_code');
$client->client_name = $request->input('client_name');



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire