In routes.php I have this code above all routes:
# Lang::get('routes.page') = 'page';
if (preg_match('/\\/'.Lang::get('routes.page').'-[0-9]+/i',
$_SERVER['REQUEST_URI'], $matches)) {
if (isset($matches[0]) and strtolower($matches[0]) !== $matches[0]) {
$url = str_ireplace(
'/'.Lang::get('routes.page').'-',
'/'.Lang::get('routes.page').'-',
$_SERVER['REQUEST_URI']
);
return Redirect::to($url, 301);
}
}
It's giving me error:
Error in exception handler: Route [content] not defined. (View: /path/to/app/views/view.blade.php) (View: /path/to/app/views/view.blade.php) in /path/to/vendor/laravel/framework/src/Illuminate/Routing/UrlGenerator.php:231
This is Laravel 4.2. Why I get this error?
Route::get('content', ...)
or similar in your routes file? – user1669496