Setup a new project using Laravel Sail (macOS)#1 - 02:33
Executing commands inside your application containers#2 - 02:20
Creating a database client connection#3 - 01:30
Testing emails with Mailhog#4 - 02:35
Changing the php version in Laravel Sail#5 - 01:29
Run Sail and Valet in parallel#6 - 01:39
Customizing Laravel Sail#7 - 01:25
Setup Laravel Sail for an existing Laravel application#8 - 00:49
Creating a database client connection
[00:00] If we open thinker using Sail, and create a user using the user factory, we'll see that we don't get any errors. We can even fetch the users, and here it is right here. That's because when we create an application using Sail, the database part is also taken care of. All we need to do is to connect to it.
[00:31] Here's how to do it. Open your database, client; in my case I'm using TablePlus, click create a new connection, pick mysql, create, and then here, on the connection name, you can type in whatever you want. I'll name it tallpal sail, leave the host and the port as they are, and to grab the username open your environment file, go to the db connection details, grab the username, grab the password, and the database name.
[01:17] Now we can test the connection, and since they are all green, we can click connect; and here it is; our database. And this is the user we've created using thinker.