valeryan

valeryan

Member Since 4 Years Ago

Experience Points 3,585
Experience Level 1

1,415 experience to go until the next level!

In case you were wondering, you earn Laracasts experience when you:

  • Complete a lesson — 100pts
  • Create a forum thread — 50pts
  • Reply to a thread — 10pts
  • Leave a reply that is liked — 50pts
  • Receive a "Best Reply" award — 500pts
Lessons Completed 91
Lessons
Completed
Best Reply Awards 0
Best Reply
Awards
  • start-engines Created with Sketch.

    Start Your Engines

    Earned once you have completed your first Laracasts lesson.

  • first-thousand Created with Sketch.

    First Thousand

    Earned once you have earned your first 1000 experience points.

  • 1-year Created with Sketch.

    One Year Member

    Earned when you have been with Laracasts for 1 year.

  • 2-years Created with Sketch.

    Two Year Member

    Earned when you have been with Laracasts for 2 years.

  • 3-years Created with Sketch.

    Three Year Member

    Earned when you have been with Laracasts for 3 years.

  • 4-years Created with Sketch.

    Four Year Member

    Earned when you have been with Laracasts for 4 years.

  • 5-years Created with Sketch.

    Five Year Member

    Earned when you have been with Laracasts for 5 years.

  • school-session Created with Sketch.

    School In Session

    Earned when at least one Laracasts series has been fully completed.

  • welcome-newcomer Created with Sketch.

    Welcome To The Community

    Earned after your first post on the Laracasts forum.

  • full-time-student Created with Sketch.

    Full Time Learner

    Earned once 100 Laracasts lessons have been completed.

  • pay-it-forward Created with Sketch.

    Pay It Forward

    Earned once you receive your first "Best Reply" award on the Laracasts forum.

  • subscriber-token Created with Sketch.

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • lifer-token Created with Sketch.

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • lara-evanghelist Created with Sketch.

    Laracasts Evangelist

    Earned if you share a link to Laracasts on social media. Please email [email protected] with your username and post URL to be awarded this badge.

  • chatty-cathy Created with Sketch.

    Chatty Cathy

    Earned once you have achieved 500 forum replies.

  • lara-veteran Created with Sketch.

    Laracasts Veteran

    Earned once your experience points passes 100,000.

  • 10k-strong Created with Sketch.

    Ten Thousand Strong

    Earned once your experience points hits 10,000.

  • lara-master Created with Sketch.

    Laracasts Master

    Earned once 1000 Laracasts lessons have been completed.

  • laracasts-tutor Created with Sketch.

    Laracasts Tutor

    Earned once your "Best Reply" award count is 100 or more.

  • laracasts-sensei Created with Sketch.

    Laracasts Sensei

    Earned once your experience points passes 1 million.

  • top-50 Created with Sketch.

    Top 50

    Earned once your experience points ranks in the top 50 of all Laracasts users.

20 Sep
2 years ago

valeryan left a reply on L5 - Request To A Subdomain Is Causing The Session To Be Regenerated

Hey canfiax,

Many things have changed. Ultimately my issues were a mix of cors, origin and header problems. I solved the cors side by using https://github.com/barryvdh/laravel-cors and on the javascript side I use the solution from http://stackoverflow.com/questions/13002038/setting-a-cookie-on-a-subdomain-from-an-ajax-request.

Good luck

14 Jan
4 years ago

valeryan left a reply on L5 - Request To A Subdomain Is Causing The Session To Be Regenerated

Thanks Bashy, That does appear to fix the problem. I have update the repo with the fix if anyone wants to see what I had to change.

13 Jan
4 years ago

valeryan left a reply on L5 - Request To A Subdomain Is Causing The Session To Be Regenerated

Ok so I created a laravel repo with a basic recreation of my problem. https://github.com/valeryan/L5sessiontest The readme explains the setup.

valeryan left a reply on L5 - Request To A Subdomain Is Causing The Session To Be Regenerated

Yes the encrypted token is passed in the header and the sessions are all being created under .example.com domain. The token mismatch is because Laravel is generating a new session with each request. If i disable token verification I still get the problem with a new session for each ajax request. Thanks for the replies though. I will try to put together a small code test that showcases the problem better.

valeryan started a new conversation L5 - Request To A Subdomain Is Causing The Session To Be Regenerated

EDIT - I created a git repo that show this problem in action. https://github.com/valeryan/L5sessiontest

TLDR - Session are not working across subdomains for me in L5 with session domain set to .example.com

So I have been building some test applications using the Laravel development branch. My application has a main domain like 'example.com' and a Restful API at 'api.example.com'. Anytime I try to make a request to the API I get a token mismatch exception. I disable the verify token middleware of course my request goes through. I could not find any weird problems with any of the code that handles all the verification stuff on the Laravel side, but when I opened the session storage folder in my application I had like 50 session files. I noticed that anytime I refreshed a page with an api request in it a new session gets generated. if the page has 2 request two new session get generated ect... The request are made via ajax. I can move my API routes to example.com/api and session work just fine. I can browse to api.example.com and session work find that way. I have a session domain set to .example.com in my config so that the session is shared between these domians. The API and main site are running on the same Laravel code that I just download form git yesterday. I am also passing CORS headers to allow the request. if I turn of the token verification the calls work but the session is still regenerated so things like auth don't persist.

I did not have any issues with dividing up my API like this in L4. Has anyone else ran into an issue like this with Laravel 5?