Комментарии:
Great series. Super well explained, practical examples with no nonsense theoretical stuff.
What a breeze to dive into.
Future video ideas if you need:
- how to deploy the project;
- how to take a project from another developer. How to get familiar with it, how to develop on top of it, etc.
Keep up the good work!
From a database perspective the 'update' method shown in this video creates a 'new' entry/row on the ideas database table - i.e. because the update method shown is not using any "where" clause to select a 'id'/row from the db table.
However based on approach(es) in your earlier video on the delete method - the following seems to provide the desired 'update' result:
public function update($id)
{
request()->validate([
'content' => 'required|min:5|max:240'
]);
$idea = Idea::where('id', $id)->firstOrFail();
$idea->content = request()->get('content', '');
$idea->save();
return redirect()->route('ideas.show', $idea->id)->with('success', "Idea updated successfully");
}
The $editing thins does not work for me. Any guesses?
ОтветитьSir pls source code of this project
ОтветитьMy update works, however i dont get the success message eventhough my code is exactly the same as shown
Ответитьthis left me confuse and frustratedd
Ответить