Good evening.
I made a route called 'app' this route basically serves to create a session and redirect to the home.
However, when deploying on the server the route does not work and it gets redirected with code 301 for the same URL.
I tried in the route file itself to return a string when the 'app' route was accessed, but the laravel was already redirecting and did not even fall into the route file.
If I make a route with any other name it works, but I'd like to use 'app'
The following code:
routes/web.php
Route::get('/app', 'CatalogoController@app');
OR
Route::get('/app', function(){
return 'hello';
});
app/Http/Controllers/CatalogoController.php
public function app( Request $request )
{
$request->session()->put('app', true);
return redirect()->action('CatalogoController@index');
}
In the route file the first item is referring to this route.
.htacess
Options +FollowSymlinks -MultiViews
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} !^/public/
RewriteRule (.*) /public/$1 [L]
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2qlu23o
via IFTTT
Aucun commentaire:
Enregistrer un commentaire