So I've read through all the Laravel sessions information and all the stackoverflow questions about Laravel sessions but it's just no help.
Im trying to store the username when I'm logging in, and I want it to show the whole time I'm logged in on a page. Now when I login I get to the main page and the username shows, and I go back to login, which redirects me to the main page and the username is not there anymore. The code I'm using:
Session::put('username', Input::get('username'));
$value = Session::get('username');
return View::make('main')->with('username',$value);
and then in my main.blade.php:
@if(!empty($username))
{{$username}}
@endif
I have no idea what I'm doing wrong. I'm doing it exactly like all the examples. What am I doing wrong here?
app/config/session.php?@if...can be shortened to{{ $username or '' }}storage_path().'/sessions', right? If so, fire up a terminal, go to your project root and typechmod -R a+rwx app/storage. Maybe it's necessary to putsudoin front.