Purchase access to watch this video.

Unlock course for £159

Already purchased access? Login

Adding authentication with Breeze

Connect GitHub

Transcript was automatically generated and may be inaccurate.

  1. As mentioned in the previous video, I'm working on a brand new machine here, so
  2. I don't have things like PHP or Compose are installed on my Mac.
  3. We're instead going to be working with these via the cell environment setup.
  4. To make this easier, we're going to need to install an alias.
  5. The cell docs have an example of this. If we go to "configuring shell alias",
  6. we'll see this line here. It needs to be pasted into our ZShell RC file.
  7. So if we copy this,
  8. and we can open our ZShell RC file. You can either open it on the command line
  9. or in a text header like Visual Studio Code.
  10. If you already have contents in the file, just paste it after at the end. Save
  11. the file.
  12. If we open a new tab, type which cell.
  13. We can see our alias has been registered.
  14. Now that we have our project created and running using cell, we can move to add
  15. an authentication to our application.
  16. For this, we'll use a Laravel Starter Kit called "breeds", as we only need
  17. basic authentication functionality such as Logging in and Registering.
  18. And it'll also give us some tailwind styles as a starter point for our
  19. application.
  20. We can add over to the "breeds" section of the Laravel docs.
  21. Scroll down to "installation".
  22. And we're going to use the "breeds" with the "blade" stack.
  23. So we can copy this command.
  24. Change "directory" into where we've stored our website.
  25. Paste the command.
  26. We also need a pre-pended with "cell". As I say, I don't have composers
  27. installed on this machine.
  28. If we head back to the Laravel talks, as mentioned, we're going to use a "bre
  29. eds" with the "blade" stack.
  30. So we need to copy these commands.
  31. Paste the command.
  32. And we need to replace "php" with "cell".
  33. We also know we use them with the "blade" stack, so we're going to use "blade"
  34. as an argument.
  35. Let's grab this command.
  36. Remember to replace "php" with "cell".
  37. Let's run these two commands.
  38. Instead of "replace" on "mpm", we're going to take a pre-pended "cell".
  39. I'm also going to run "build" rather than "dev".
  40. We should now have "breeds installed". We can test this by seeing what "reeds"
  41. has been registered in our application.
  42. So now we can see "reeds" for things like "logging in", "logging out", "re
  43. setting passwords" and "registering".
  44. If you go on the browser, we should be able to hit those "reeds" and see our
  45. application styled.
  46. And that's it.
  47. We now have "breeds installed" and add an authentication and registration to
  48. our application.
  49. So it's probably a good point at this stage to register a user for yourself.
  50. {silence}

Resources