Home / Snippets / Nested Route Group in Laravel
Nested Route Group in Laravel cover

Nested Route Group in Laravel


2 years ago


In Laravel you can nest route group, what that means is that you can create a group within a group. To achieve that you can define your route like below.
Route::group(['prefix' => 'hello'], function () {
    Route::group(['prefix' => 'world'], function () {
        Route::get('/', function () {
            return 'hello world';

So now you can access the route by entering "/hello/world" and get the "hello world" string back as response.
notion avatar

Ahmad Aziz

Week-end developer currently experimenting with web, mobile, and all things programming.






Support Us

If you like our tutorial, support us by being our Patreon or buy us some coffee ☕️

Post Tutorials

Learn trending tutorials for ReactJs, React Native, VueJS, NextJs, Laravel, Tailwind CSS, and Flutter development.
View Tutorials

Code Components

Collection of Tailwind CSS components for everyone to use. Browse all of the components that's right for your web projects
View Components

Welcome to PostSrc V3

PostSrc Dark Logo

You have to login to favorite this