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

ApexLeo's avatar

Need Help related to Herd

Hi i am using Herd and i have an already existing site which i added into Herd using Herd GUI "Link Existing Project" and i have linked that project successfully, and i can open the site using the Link that herd provide.

Now the thing is i am unable to login into our site.

  1. I can access the database using the Herd provided link successfully and all data is there no issue
  2. I can login into the system using tinker by saying Auth::loginUsingId() successfully as well
  3. I can login into the system using the Api (Postman) successfully.
  4. But i am not able to login into the website using the browser. it redirect me back to the login page without any error. i have put dd into login and its not showing either
0 likes
13 replies
Tray2's avatar

This has nothing to do with Herd, it sounds like you have either a validation error, or you don't redirect to the dashboard.

ApexLeo's avatar

@Tray2 i dont think so. because if i dont use Herd my application wroks fine in browser and in api. but when i use Herd my browser don't let me login

ApexLeo's avatar

@Tray2 one more thing that i tried is that using Herd is that.

  1. i created another route POST /testing and updated my login form accordingly. it redirect me back. it did not hit the url.
  2. then i changed the url to GET /testing and send post from login form it gives me this error "The POST method is not supported"
  3. then i send GET request from login form to GET /testing then it hit.

its not sending the POST request from the browser

Tray2's avatar

@ApexLeo Then you have something wrong in your code in the login form, it should use a post request, and it seems that you are using a get.

ApexLeo's avatar

@Tray2 i think you have not fully read my message. I was sending the POST request from my form but my form redirect back to login without hitting any URL that it supposed to hit. BUT if i chnaged the Form to GET then it hit the URLs.

And again my application is working fine WITHOUT HERD. i can login and do other stuff. But as soon as i switched to HERD it stop sending POST requests to BACKEND

Tray2's avatar

@ApexLeo Then your routes are wrong, you better start sharing some code, because herd works just fine.

ApexLeo's avatar

its ok. i just stop using the Herd for now. but if anyone know what's the issue let me know as well.

For Info: i am using Windows 11

1 like
ApexLeo's avatar

Does herd has anything to do with "Session" and "CSRF". as soon as i put a POST route in VerifyCsrfToken middleware my POST request reach the backend else it give me CSRF token mismatch exception

Anyone has any info pls let me know

Tray2's avatar

@ApexLeo No, that is all on you, Herd is just a ease of use GUI/Wrapper to help you install the necessary applications for local development, it doesn't care what middleware you use or don't use.

ApexLeo's avatar

hi @Tray2 i realy get what you are traying to say here. But then y is that if i don't use the Herd enviroment my application works fine? Without it i can login without any issues, i don't get csrf token issue or any other issue. my application works fine. and i mean it, its working locally, on staging and also on production for almost 2 yrs now, no issue there.

But as soon as i switch to Herd enviroment my application start showing unexpected behavior. and please stop being on Problem End try to be on Solution End. you can advice me like

  1. you need to change env if i need to
  2. you need confirm this/that setting.

provide a solution rather then saying your form is wrong, route is wrong. I have told many times my application is working fine no form issue, no route issue, i even create seprate form with nothing in it and it still not going to the route. please provide a solution that there might me something that i am missing. any setting or config

Really Appreciate your Help thanks

1 like
zaimazhar's avatar

I am having the same issue, without using Herd then I can login without a problem. But as soon I installed Herd, I cannot login into my dashboard anymore.

Going through Network tab shows I was redirected to my dashboard and then quickly redirected back to my login page.

https://imgur.com/a/lyfAOhY

And again, without Herd and using php artisan serve works totally fine. I can login and access the dashboard without any problem.

zaimazhar's avatar

Okay this might sound embarrassing but my environment was staging all along and I have been using it to trigger S3 file storage on local development.

I was about to give up and go back on using php artisan serve until I tried my last straw. I changed my APP_ENV from staging to local and now I can access the site back.

Please or to participate in this conversation.