Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

osherdo's avatar

Best way to start a session in Laravel 5.1

Hi.

I would like to know what's the best way to start a session once a user sends data to database (registeration). Then I need to keep user session across multiple pages.

What's the best parctices? references would be nice too!

Thanks.

0 likes
5 replies
jlrdw's avatar
jlrdw
Best Answer
Level 75

Have you read the docs for authentication?

1 like
jekinney's avatar

Laravel does sessions for auth already for you.

1 like
jlrdw's avatar

Don't forget there was a free Laracast on authentication haven't looked lately but I think it's still free.

claudsonm's avatar

Laravel ships with an basic scaffolding for login and registration views and routes. For most projects, that's all you need.

Go to your project folder and run php artisan make:auth

Please or to participate in this conversation.