javineo
260
11
Laravel

Syntax for Route::group L4 to L5

Posted 1 year ago by javineo

I'm trying to take my project from Laravel 4.2 to Laravel 5.0 and in the file route.php I found some inconveniences.

Laravel 4.2 code in route.php

    Route::group(['prefix' => 'operaciones'], function(){
        #Socios
        Route::group(['before' => 'socio|valida_modulo:socios'], function(){
            Route::get('/transferencias',   '[email protected]');
            Route::get('/pagos/tarjetas',   '[email protected]' );
            Route::get('/pagos/prestamos',  '[email protected]');
            Route::get('/pagos/servicios',  '[email protected]');
            Route::get('/amt',              '[email protected]'   );


and this is a code in Laravel 5.0 route.php file:

    Route::group(['prefix' => 'operaciones'], function(){
        #Socios
        Route::group(['middleware' => ['socio','valida_modulo']], function(){
            Route::get('/transferencias',   '[email protected]');
            Route::get('/pagos/tarjetas',   '[email protected]' );
            Route::get('/pagos/prestamos',  '[email protected]');
            Route::get('/pagos/servicios',  '[email protected]');
            Route::get('/amt',              '[email protected]'   );


Is the code well converted? Is the syntax correct?

Tanks!!

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

Reply to

Use Markdown with GitHub-flavored code blocks.