Sign up ×
Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute:

Im playing with Angular and laravel, so I have this RBAC Package of my own, and Im trying to make it work in a Rest way... I'm barely learning this... so my question is...

My package depends on php sessions, where an array with user roles and permissions is stored, so each time I run my filter to determine if the use should perform an action over a resource of the application or not it reads the session instead of querying the DB every time.

So... I have my routes functioning and all, but is there a way to access the user session through curl? ... better question is there a way to keep the user logged in so that way laravel knows where the session is store at?

share|improve this question

1 Answer 1

I am not sure this is what you want, but, PHP stores your session id as a cookie. And, curl can load cookies from a file. So, if you store your session id in a cookie file, and tell curl to load the cookies from that file, your problem is solved.

I hope this gives you a hint.

EDIT:
Laravel stores it's session coookie as laravel_session.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.