Thank you again Andrew for a great video. Could you please make a video on a SPA solution with a Laravel backend and Vue frontend as separate Docker containers using Sanctum and docker-compose? That would be very helpful.
Me, personally, I'd go with Laravel + Fortify. Lumen is great for very simple APIs that you expect massive amounts of requests to. If you need any other features, it's usually a lot of work to add them to it, without a lot of benefit over just using the full Laravel framework.
Hi Andrew, if we change the middleware of all the API routes to `web` in the RouteServiceProvider file, would the future API calls from other devices (e.g. mobile) be affected? If we are going to change the middleware, why don't we just place all the route in the web.php routing file and prefix `/api/` to the route then?
Hello Andrew I can't find part 1 et 3 of your series. It would be nice to have the link in the description. Thank you for sharing your stuff it's amazing!
Hi thanks for the explanation but I tried your steps, but I kept getting CSRF token mismatch when I hit the login function for the SPIA. Not sure what I'm getting wrong
It finally worked. Turns out, while trying things out and following all sorts of rabbit holes, I had added protected $middleware = [ \App\Http\Middleware\TrustHosts::class, \Illuminate\Session\Middleware\StartSession::class, .... ] in the Kernel.php. After removing them, it worked like a breeze. Jeez...took me over an hour.
Why make a SPA that is based in the same application, instead of decoupling it? The way i see it, this method might as well just use classic PHP authentication with Laravel Auth Please enlighten me if i am wrong
A small question, hopefully someone is able to guide me. I managed to register using my email without the .com part, where can we add the necessary checks so that a user will see an error if they fail to enter a correct email address? Thanks!
Andrew, thanks for great guides. Сould you explain to me why we use for api web middleware? Is it because we are using session cookies? And when we use api middleware we use tokens?
How to add prefix in default /login & /register api in laravel sanctum ? Ex. Default api are /login & /register I want /api/login & /api/register How to achieve this? Also in /user api i am getting many fields like id,name,email,created_date I just want name and email id How to do that?
Good idea! That'll be a pretty big undertaking, even if I keep it simple, but I'll add it to my backlog of video ideas (so keep an eye out in the future!)
@@aschmelyun thanks for the reply bro! This project will be trendy I'm almost sure! Its pretty different than the other laravel tutorials right there ;)
I wish you would speak a bit less robotic, and less concise, you are talking to people who are trying to learn, elaborate on things, you have an amazing voice but you are not using it to its fullest. I still had to watch a foreign guy who barely speaks english after your video because he actually explained things in greater detail... i wish you would do the same.