Creating a Demo User Account for web visitors?

Posted 2 months ago by geerizzle

I want to show my potential customers an example of amazing dashboard they'll get when they signup :)

Just wondering the best way to do this. A few thoughts I've had.

  • Create the user account, obviously, add checks to my ProfileController that checks if this account is logged in and stops the password - or anything else - being changed.

  • Or maybe this is better managed with a IsNotDemoUser middleware on the POST routes? If the route is not allowed can I return a defined error (using Vue Ajax/Axios)?

  • Add a specific route for the demo account, so when you visit it automatically does an Auth::login for the demo user

  • Alternatively do an impersonation of the demo user. I already do this from an admin account using middleware. Not sure if I could make a guest user do it too?

  • How to make sure that the demo user is logged out if/when they go on to checkout. I guess I could add this specifically to the checkout controller. Or could I do like a Session flash typeof thing where the user is only logged in temporarily while they browse the dashboard?

Any thoughts most welcome!

Please sign in or create an account to participate in this conversation.