E
E
Exit_X2021-03-06 21:50:52
Laravel
Exit_X, 2021-03-06 21:50:52

How to use prefix in apiResource?

Route::group(['prefix' => 'employee'], function (){
        Route::apiResource('КАК СЮДА ПОПАСТЬ?','Контроллер5555');
});

Need /employee => Controller5555
How to use this prefix internally? Fucked up with this

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey delphinpro, 2021-03-06
@Exit_X

It's not entirely clear what you mean.
Possibly like this:

Route::group(['prefix' => 'employee'], function (){
        Route::apiResource('/', 'Контроллер5555');
});

K
Konstantin B., 2021-03-07
@Kostik_1993

What reason does not allow to remove a resource from a group?

Route::group(['prefix' => 'employee'], function (){
    Route::apiResource('tasks', 'Контроллер6666');
});
Route::apiResource('employee', 'Контроллер5555');

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question