Purchase access to watch this video.

Unlock course for £159

Already purchased access? Login

Installing Laravel with Sail

  1. There are a number of ways to install Laravel, though a quick and easy way is
  2. to create a
  3. new project via the Composer command line utility, some more robust methods
  4. like using
  5. sale at Dockerbase solution.
  6. As I'm working on a brand new machine, I'm going to go with sale.
  7. Before working with sale, be sure to install Docker.
  8. The easiest way to do this is by using Docker Desktop on macOS.
  9. So if you don't have Docker installed on your machine, pause this video and go
  10. do that before
  11. continuing.
  12. Back on the Laravel docs, if we go to the get and start with the macOS section,
  13. we
  14. see this command here for creating a new Laravel up on the command line.
  15. Before running this however, I want to go back to the top and I want to go to
  16. choosing
  17. your sales services section.
  18. Here it shows you all the different services you can install using sale.
  19. Our needs are pretty minimal, so we're going to choose MySQL for the database
  20. and mail
  21. pit to be able to preview any email sent by our application.
  22. So our final command looks like this.
  23. I've chosen a project named LaraFlix, I've added Maya, Square, and Mail Pit as
  24. services.
  25. I've also changed directory into a sites directory on my computer.
  26. This is personal preference and you're free to create the project in whichever
  27. directory
  28. you usually do.
  29. Run the command.
  30. Once the command is complete, run these two commands.
  31. We should be able to go to a local host in the browser and see the Laravel bulk
  32. and
  33. page.
  34. And there we have it.
  35. We've created a new Laravel project and we're serving it using Laravel sale.
  36. [BLANK_AUDIO]

Resources

Connect GitHub