Laravel for Beginners – Learn to Build Full-Stack Web Apps

Loading video...

Route Optional Parameters

Routing

Route Optional parameters

Route::get('/posts/{category?}', function(string $category = null) {
    // ...
    return "Render Posts";
});

Discussion

Sign in to join the discussion.

No comments yet. Be the first to start the discussion!