xxxxxxxxxx
public function edit($id)
{
$user=User::find($id);
return view('editview')->with('user', $user);
}
xxxxxxxxxx
public function edit(Post $post)
{
Gate::authorize('update',$post);
return view('post.edit',compact('post'));
}