M
M
Maxim2021-01-14 00:36:24
Laravel
Maxim, 2021-01-14 00:36:24

How to properly organize an api route in Laravel?

How to pass store id correctly?

inside the route or through the post parameter?

Route::group(['prefix' => 'shop', 'namespace' => 'Shop'], function () {
            Route::post('/register', '[email protected]');
            Route::group(['prefix' => '{id}'], function () {
                Route::apiResource('/', 'ShopController');
                Route::apiResource('/news', 'ShopPostController');
                Route::apiResource('/banners', 'ShopBannerController');
                Route::apiResource('/clients', 'ShopHappyClientController');
                Route::apiResource('/clients', 'ShopHappyClientController');
            });
        });

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Danbka, 2021-01-14
@Danbka

Well, if the store is a resource, then inside the route

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question