Created
November 7, 2014 21:10
-
-
Save NightZpy/eef587eb0b21b76f848f to your computer and use it in GitHub Desktop.
Translaste routes laravel
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Route::group( | |
array( | |
'prefix' => LaravelLocalization::setLocale(), | |
'before' => 'LaravelLocalizationRoutes' // Route translate filter | |
), | |
function() | |
{ | |
/** ADD ALL LOCALIZED ROUTES INSIDE THIS GROUP **/ | |
Route::get('/', function() | |
{ | |
// This routes is useless to translate | |
return View::make('hello'); | |
}); | |
Route::get(LaravelLocalization::transRoute('routes.about'),function(){ | |
return View::make('about'); | |
}); | |
Route::get(LaravelLocalization::transRoute('routes.view'),function($id){ | |
return View::make('view',array('id'=>$id)); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment