i designed form to save data in laravel
and this problem show me
Property [id] does not exist on this collection instance.
This is my Code
// controller
public function create ()
{
$post = Post::all();
return view ("post.create",compact('post'));
}
view .create.blade.php
<form action="" method="POST">
<input type="text" name="title" placeholder="Write Title">
<input type="text" name="body" placeholder="Write Body">
<input type="submit" value="Submit" name="submit">
</form>
i know this problem is here but i don't know what can i do
'PostController@store', ['id'=>$post->id])}}" method="POST"
from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2KF3pTm
via IFTTT
Aucun commentaire:
Enregistrer un commentaire