DEV Community 👩‍💻👨‍💻

Discussion on: Authenticating a React App with Laravel Sanctum - Part 1

Collapse
coopercodes profile image
🧸 🏳️‍🌈 cooper-codes 💻 🎮

Hi, great article, this is really helping me demistify a lot of the process (still new to Laravel).
Just wanted to let you know, if you are on Laravel 8+ that tinker command wont work to create a user, but i found the solution and thought I'd leave it here for others that may get stuck.

User::factory()->create(['email'=>'bill@gmail.com', 'name'=>'Bill', 'password'=> bcrypt('password')]);
Enter fullscreen mode Exit fullscreen mode
Collapse
webprogrammerio profile image
webprogrammerio

Yes, I found the same thing with Laravel 9. Luckily I found your solution