Level 50
little example
Route::get('/posts/{id}',Controller@method);
controller
public function method($id)
{
$post = Post::find($id);
return view('post.show', compact('post'))
}
view
{{ $post->title}}
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
i have a url like localhost/posts/id here id is query which is an integer value how can i get this from this url
Please or to participate in this conversation.