cac
358
5
Laravel

Grouping Routes

Posted 6 months ago by cac

I have this group of routes where my resource route (in the second line) is missing the index route and I can't figure it out. Has anyone seen this problem?

Route::middleware(['manager'])->group(function () {
        Route::resource('manager', 'Manager\ManagerController');
        Route::prefix('manager')->group(function () {
            Route::name('manager.')->group(function () {
                Route::get('home', 'Manager\HomeController')->name('home');

                Route::resource('vacancy', 'Manager\VacancyController');
                //Benefits
                Route::get('/', 'Manager\[email protected]')->name('benefit.index');
                Route::post('vacancy/{vacancy}/benefit', 'Manager\[email protected]')->name('benefit.store');
                Route::get('vacancy/{vacancy}/benefit', 'Manager\[email protected]')->name('benefit.create');
                Route::get('{benefit}/edit', 'Manager\[email protected]')->name('benefit.edit');
                Route::get('benefit/{benefit}', 'Manager\[email protected]')->name('benefit.show');
                Route::put('benefit/{benefit}', 'Manager\[email protected]')->name('benefit.update');
                Route::delete('vacancy/{vacancy}/benefit/{benefit}', 'Manager\[email protected]')->name('benefit.destroy');
                //Pipes
                Route::resource('pipe', 'Manager\PipeController');
                Route::resource('pipe-stage', 'Manager\PipeStageController');
            });
        });
    });

What am I missing?

Please sign in or create an account to participate in this conversation.