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
Changing the php version in Laravel Sail
[00:00] Laravel Sail works with php 8.0 or php 7.4. If I type in
sail php -v and hit enter, we'll see that by default, Sail applications are set up to use php 8. But what if, for some reason, we need to use php 7?
[00:21] Before you change anything, make sure to stop sail using
sail down, then open the
docker-compose.yml file and make the following changes: here, under laravel.test, build, context, make sure you change to
runtimes/7.4 and then do the same for the image. Instead of
sail-7.4 and save.
[00:55] Once you've done that, go inside the terminal and run the following command:
sail build --no-cache. This will rebuild your container images.
[01:11] Finally run the
sail up command to start sail again. And now if we type
sail php -v again, we'll see that our new php version is 7.4.