The Problem: I am implementing a localization feature in my web application, but the application is in mid-development, so to not rewrite all the links in <form action=""> and <a href=""> I need a solution that would just add a prefix tu URLs before all other routes like /en/ or /es/, but that Application would consider /localhost/en/ as localhost/.
To clearify link like <a href="/admin"> is working as advertised http://localhost/admin, I need it to work like http://localhost/en/admin
I dont know what pieces of code is any help, so I will add code on request.
route.php looks something like this
<?php
Route::get('/', 'HomeController@index');
Route::get('admin/blocks/{size}', "AdminController@getBlocks");
Route::get('admin/del-block/{id}', "AdminController@getDelBlock");
Route::controllers([
'admin' => 'AdminController',
'auth' => 'Auth\AuthController',
'password' => 'Auth\PasswordController',
'products' => 'ProductsController'
]);
Route::get('/{slug}', "HomeController@getPage");
Route::get('/{slug}/{subslug}', "HomeController@getPage");
and in views I generate URLs by hand
<a href="/admin/blocks{{$block->size}}">Link</a>
<form action="/products/new" > </form>