Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

PHP Laravel 4 Basics Continuing CRUD Reading Data

Frederico Machado da Silva
Frederico Machado da Silva
3,826 Points

laravel logout fail on pressing back button

I did the before auth:

<?php

Route::group(array('before' => 'auth'), function()
{
//Download
Route::resource('/download', 'DownloadController');
Route::get('/download/create', 'DownloadController@create');
Route::post('/download/persist', 'DownloadController@persist');
Route::get('/download/relatorio/{id}', 'DownloadController@relatorio');
Route::get('/download/edit', 'DownloadController@show');

Route::get('/download/tipo/{id}', 'DownloadController@tipo');

Route::resource('/empresa', 'EmpresaController');

//Visitante
Route::get('/empresa/edit/{id}', 'EmpresaController@edit');
Route::get('/empresa', 'EmpresaController@index');
});

But when i go back, i can see the page

1 Answer

The browser 'back' button will try and return you to the previous page in exactly the same state as you left it (Depending on the browser). The real question is - can you do anything on that page without being forced to log back in again?