Support the ongoing development of Laravel.io →
posted 2 years ago
Last updated by @tvbeek 2 years ago.

klasss-pt liked this thread

1
moderator

Hello @klasss-pt

I didn't see a save call in your edit part. That is needed to save the changed values in the database.

// $item need to be loaded here
$item->nome = $request->nome;
$item->email = $request->email;

$item->n_ferias_disponiveis = $request->n_ferias_disponiveis;
$item->data_registo = $now;
$item->save();

$ferias= ferias::find(1); will find the ferias object with id 1. I don't know where you get your id from but you need to place that in the find call.

ps. I have updated your post to add the codeblocks

0

So put something like

$ferias=ferias::find($item->id);

would it work?

0

Yes, it will definitely work!

0

Sign in to participate in this thread!

Eventy

Your banner here too?

João klasss-pt Joined 20 May 2022

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.