G
G
Givi7772019-08-08 15:57:09
Laravel
Givi777, 2019-08-08 15:57:09

How can Laravel route groups be separated?

Route::namespace('Hr')->group(function () {
    Route::group(['middleware' => ['role:hr']], function () {
        Route::get('otdel/{url}', '[email protected]')->name('personal-index');
        Route::get('otdel/{url}/statistic', '[email protected]')->name('personal-statistic');
        Route::get('otdel/{url}/users', '[email protected]')->name('personal-users');
    });

    Route::group(['middleware' => ['role:hr_rus']], function () {
        Route::get('otdel-ru/{url}', '[email protected]')->name('personal-index');
        Route::get('otdel-ru/{url}/statistic', '[email protected]')->name('personal-statistic');
        Route::get('otdel/{url}/users', '[email protected]')->name('personal-users');
    });

    Route::post('otdel/createEmployee', '[email protected]')->name('createEmployee');
    Route::get('person-delete/{id}', '[email protected]')->name('person.delete');
    Route::get('trash/{id}', '[email protected]')->name('trashEmployee');
});

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Arthur, 2019-08-09
@astralo

In RouteServiceProvider you can scatter over files

Y
Yaroslav Ivanov, 2017-12-19
@rafamont

https://jsfiddle.net/space2pacman/r5rzh1pp/

A
Alex-1917, 2017-12-19
@alex-1917

well dug!
the background is changing by hover, what else is there to chew on? and the element itself has the appropriate size, the background is transparent without a hover ...
this is all that I could see on your photo, as usual, the minimum information in the question gives the most banal answer

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question