Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support group function in doc #32

Closed
nhiepphong opened this issue Mar 29, 2017 · 2 comments
Closed

Support group function in doc #32

nhiepphong opened this issue Mar 29, 2017 · 2 comments

Comments

@nhiepphong
Copy link

screen shot 2017-03-29 at 1 47 25 pm

screen shot 2017-03-29 at 1 47 47 pm

I want group 2 group: API For App and API for POS
Do you help me ?

I research but i not found it.

Thanks you very much.

@Artistan
Copy link
Contributor

Artistan commented Oct 20, 2017

this should work

Route::group(['prefix' => 'api', 'middleware' => 'auth'], function()
{
    // Your routes to /api/...
    Route::group(['app' => 'commissions'], function()
        // Your routes to /api/app/...
    });
    Route::group(['pos' => 'commissions'], function()
        // Your routes to /api/pos/...
    });
});

You can see which routes are created by running php artisan route:list

@Artistan
Copy link
Contributor

Laravel 5.4 defaults to api prefix (Route::prefix('api')). If your routes/api.php looks like this...

Route::group(['prefix' => 'v1'], function(){
     // ...
});

@f2m2rd f2m2rd closed this as completed Feb 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants